mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Auto merge of #12863 - emilio:disable-media, r=larsbergstrom
script: Disable our dependency in ffmpeg until the media madness is over <!-- Please describe your changes on the following line: --> r? @larsbergstrom --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12863) <!-- Reviewable:end -->
This commit is contained in:
commit
fb7cb92076
14 changed files with 8 additions and 115 deletions
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue