mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Shut down the media stack when shutting down the constellation
This commit is contained in:
parent
17e97b9320
commit
38fd9648ce
4 changed files with 19 additions and 2 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -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)",
|
||||
|
|
|
@ -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"}
|
||||
|
|
|
@ -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<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
|
||||
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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue