script: Disable our dependency in ffmpeg until the media madness is over.

This commit is contained in:
Emilio Cobos Álvarez 2016-08-14 15:45:34 -07:00
parent ec53136863
commit b9f8905b21
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
14 changed files with 8 additions and 115 deletions

View file

@ -20,9 +20,6 @@ cmake = "0.1"
[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
tinyfiledialogs = {git = "https://github.com/jdm/tinyfiledialogs"}
[target.'cfg(not(any(target_os = "android", target_arch = "arm", target_arch = "aarch64")))'.dependencies]
video-metadata = {git = "https://github.com/GuillaumeGomez/video-metadata-rs"}
[dependencies]
angle = {git = "https://github.com/servo/angle", branch = "servo"}
app_units = "0.3"

View file

@ -36,8 +36,6 @@ use string_cache::Atom;
use task_source::TaskSource;
use time::{self, Timespec, Duration};
use url::Url;
#[cfg(not(any(target_os = "android", target_arch = "arm", target_arch = "aarch64")))]
use video_metadata;
struct HTMLMediaElementContext {
/// The element that initiated the request.
@ -161,31 +159,11 @@ impl HTMLMediaElementContext {
}
}
#[cfg(not(any(target_os = "android", target_arch = "arm", target_arch = "aarch64")))]
fn check_metadata(&mut self, elem: &HTMLMediaElement) {
match video_metadata::get_format_from_slice(&self.data) {
Ok(meta) => {
let dur = meta.duration.unwrap_or(::std::time::Duration::new(0, 0));
*elem.video.borrow_mut() = Some(VideoMedia {
format: format!("{:?}", meta.format),
duration: Duration::seconds(dur.as_secs() as i64) +
Duration::nanoseconds(dur.subsec_nanos() as i64),
width: meta.size.width,
height: meta.size.height,
video: meta.video,
audio: meta.audio,
});
// Step 6
elem.change_ready_state(HAVE_METADATA);
self.have_metadata = true;
}
_ => {}
}
}
#[cfg(any(target_os = "android", target_arch = "arm", target_arch = "aarch64"))]
fn check_metadata(&mut self, elem: &HTMLMediaElement) {
// Step 6.
//
// TODO: Properly implement once we have figured out the build and
// licensing ffmpeg issues.
elem.change_ready_state(HAVE_METADATA);
self.have_metadata = true;
}

View file

@ -89,8 +89,6 @@ extern crate url;
#[macro_use]
extern crate util;
extern crate uuid;
#[cfg(not(any(target_os = "android", target_arch = "arm", target_arch = "aarch64")))]
extern crate video_metadata;
extern crate webrender_traits;
extern crate websocket;
extern crate xml5ever;

View file

@ -1941,7 +1941,6 @@ dependencies = [
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
"uuid 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"video-metadata 0.1.3 (git+https://github.com/GuillaumeGomez/video-metadata-rs)",
"webrender_traits 0.3.0 (git+https://github.com/servo/webrender_traits)",
"websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
"xml5ever 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2479,17 +2478,6 @@ dependencies = [
"serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "video-metadata"
version = "0.1.3"
source = "git+https://github.com/GuillaumeGomez/video-metadata-rs#ca921f8529d4ed4b3e093fe30143b3fba08a7bf4"
dependencies = [
"gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "void"
version = "1.0.2"