diff --git a/Cargo.lock b/Cargo.lock index a79f1a669b9..79ff1c2194b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -495,6 +495,7 @@ dependencies = [ "devtools_traits 0.0.1", "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.0.1 (git+https://github.com/servo/gaol)", + "gecko-media 0.1.0 (git+https://github.com/servo/gecko-media.git)", "gfx 0.0.1", "gfx_traits 0.0.1", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1014,13 +1015,12 @@ dependencies = [ [[package]] name = "gecko-media" version = "0.1.0" -source = "git+https://github.com/servo/gecko-media.git#47e030fd5670c7bf16108647f6ee07fd83175401" +source = "git+https://github.com/servo/gecko-media.git#4417372d89a52ce1c5c1bde5bb216407fd41ecc7" dependencies = [ "bindgen 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", "cmake 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "cubeb-pulse 0.0.2 (git+https://github.com/djg/cubeb-pulse-rs?branch=dev)", "encoding_c 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "mp4parse 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/components/constellation/Cargo.toml b/components/constellation/Cargo.toml index 0e48b302dc5..3968d5f1170 100644 --- a/components/constellation/Cargo.toml +++ b/components/constellation/Cargo.toml @@ -43,3 +43,6 @@ webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]} [target.'cfg(all(not(target_os = "windows"), not(target_os = "ios")))'.dependencies] gaol = {git = "https://github.com/servo/gaol"} + +[target.'cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))'.dependencies] +gecko-media = {git = "https://github.com/servo/gecko-media.git"} diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index ea73dca4c40..3fa7ce3c5f7 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -108,6 +108,8 @@ use debugger; use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg}; use euclid::{Size2D, TypedSize2D, ScaleFactor}; use event_loop::EventLoop; +#[cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))] +use gecko_media::GeckoMedia; use gfx::font_cache_thread::FontCacheThread; use gfx_traits::Epoch; use ipc_channel::{Error as IpcError}; @@ -1481,6 +1483,16 @@ impl Constellation debug!("Asking compositor to complete shutdown."); self.compositor_proxy.send(ToCompositorMsg::ShutdownComplete); + + #[cfg(all( + any(target_os = "macos", target_os = "linux"), + not(any(target_arch = "arm", target_arch = "aarch64")), + ))] + { + if let Err(()) = GeckoMedia::shutdown() { + warn!("Media stack shutdown failed."); + } + } } fn handle_pipeline_exited(&mut self, pipeline_id: PipelineId) { diff --git a/components/constellation/lib.rs b/components/constellation/lib.rs index a0fd36325a8..59ef714ef88 100644 --- a/components/constellation/lib.rs +++ b/components/constellation/lib.rs @@ -17,6 +17,8 @@ extern crate devtools_traits; extern crate euclid; #[cfg(all(not(target_os = "windows"), not(target_os = "ios")))] extern crate gaol; +#[cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))] +extern crate gecko_media; extern crate gfx; extern crate gfx_traits; extern crate hyper;