mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Remove use of auto media backend. And update servo-media
This commit is contained in:
parent
54f54d194d
commit
74a48937f1
4 changed files with 69 additions and 25 deletions
|
@ -104,7 +104,6 @@ use script_traits::{ConstellationMsg, SWManagerSenders, ScriptToConstellationCha
|
|||
use servo_config::opts;
|
||||
use servo_config::{pref, prefs};
|
||||
use servo_media::ServoMedia;
|
||||
use servo_media_auto::Backend;
|
||||
use std::borrow::Cow;
|
||||
use std::cmp::max;
|
||||
use std::path::PathBuf;
|
||||
|
@ -118,6 +117,26 @@ pub use msg::constellation_msg::TopLevelBrowsingContextId as BrowserId;
|
|||
pub use servo_config as config;
|
||||
pub use servo_url as url;
|
||||
|
||||
#[cfg(any(
|
||||
all(target_os = "android", target_arch = "arm"),
|
||||
target_arch = "x86_64"
|
||||
))]
|
||||
mod media_platform {
|
||||
pub use self::servo_media_gstreamer::GStreamerBackend as MediaBackend;
|
||||
use servo_media_gstreamer;
|
||||
}
|
||||
|
||||
#[cfg(not(any(
|
||||
all(target_os = "android", target_arch = "arm"),
|
||||
target_arch = "x86_64"
|
||||
)))]
|
||||
mod media_platform {
|
||||
pub use self::servo_media_dummy::DummyBackend as MediaBackend;
|
||||
use servo_media_dummy;
|
||||
}
|
||||
|
||||
type MediaBackend = media_platform::MediaBackend;
|
||||
|
||||
/// The in-process interface to Servo.
|
||||
///
|
||||
/// It does everything necessary to render the web, primarily
|
||||
|
@ -185,7 +204,7 @@ where
|
|||
let opts = opts::get();
|
||||
|
||||
if !opts.multiprocess {
|
||||
ServoMedia::init::<Backend>();
|
||||
ServoMedia::init::<MediaBackend>();
|
||||
}
|
||||
|
||||
// Make sure the gl context is made current.
|
||||
|
@ -757,7 +776,7 @@ pub fn run_content_process(token: String) {
|
|||
script::init();
|
||||
script::init_service_workers(sw_senders);
|
||||
|
||||
ServoMedia::init::<Backend>();
|
||||
ServoMedia::init::<MediaBackend>();
|
||||
|
||||
unprivileged_content.start_all::<script_layout_interface::message::Msg,
|
||||
layout_thread::LayoutThread,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue