Remove use of auto media backend. And update servo-media

This commit is contained in:
Fernando Jiménez Moreno 2019-04-23 16:15:46 +02:00
parent 54f54d194d
commit 74a48937f1
4 changed files with 69 additions and 25 deletions

59
Cargo.lock generated
View file

@ -2400,7 +2400,8 @@ dependencies = [
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
"servo-media 0.1.0 (git+https://github.com/servo/media)",
"servo-media-auto 0.1.0 (git+https://github.com/servo/media)",
"servo-media-dummy 0.1.0 (git+https://github.com/servo/media)",
"servo-media-gstreamer 0.1.0 (git+https://github.com/servo/media)",
"servo_config 0.0.1",
"servo_geometry 0.0.1",
"servo_url 0.0.1",
@ -3780,7 +3781,7 @@ dependencies = [
[[package]]
name = "servo-media"
version = "0.1.0"
source = "git+https://github.com/servo/media#a7e38bb566e81085eef9410b9dd6bd67873ffdd9"
source = "git+https://github.com/servo/media#04bfd8853b71f99a0fa226b21d7d5f923536ddf6"
dependencies = [
"servo-media-audio 0.1.0 (git+https://github.com/servo/media)",
"servo-media-player 0.1.0 (git+https://github.com/servo/media)",
@ -3791,7 +3792,7 @@ dependencies = [
[[package]]
name = "servo-media-audio"
version = "0.1.0"
source = "git+https://github.com/servo/media#a7e38bb566e81085eef9410b9dd6bd67873ffdd9"
source = "git+https://github.com/servo/media#04bfd8853b71f99a0fa226b21d7d5f923536ddf6"
dependencies = [
"boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byte-slice-cast 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3804,19 +3805,10 @@ dependencies = [
"smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "servo-media-auto"
version = "0.1.0"
source = "git+https://github.com/servo/media#a7e38bb566e81085eef9410b9dd6bd67873ffdd9"
dependencies = [
"servo-media-dummy 0.1.0 (git+https://github.com/servo/media)",
"servo-media-gstreamer 0.1.0 (git+https://github.com/servo/media)",
]
[[package]]
name = "servo-media-dummy"
version = "0.1.0"
source = "git+https://github.com/servo/media#a7e38bb566e81085eef9410b9dd6bd67873ffdd9"
source = "git+https://github.com/servo/media#04bfd8853b71f99a0fa226b21d7d5f923536ddf6"
dependencies = [
"boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3830,7 +3822,7 @@ dependencies = [
[[package]]
name = "servo-media-gstreamer"
version = "0.1.0"
source = "git+https://github.com/servo/media#a7e38bb566e81085eef9410b9dd6bd67873ffdd9"
source = "git+https://github.com/servo/media#04bfd8853b71f99a0fa226b21d7d5f923536ddf6"
dependencies = [
"boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byte-slice-cast 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3839,7 +3831,7 @@ dependencies = [
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-app 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-audio 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-gl 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-player 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sdp 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sdp-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3848,9 +3840,12 @@ dependencies = [
"gstreamer-webrtc 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-media 0.1.0 (git+https://github.com/servo/media)",
"servo-media-audio 0.1.0 (git+https://github.com/servo/media)",
"servo-media-gstreamer-render 0.1.0 (git+https://github.com/servo/media)",
"servo-media-gstreamer-render-unix 0.1.0 (git+https://github.com/servo/media)",
"servo-media-player 0.1.0 (git+https://github.com/servo/media)",
"servo-media-streams 0.1.0 (git+https://github.com/servo/media)",
"servo-media-webrtc 0.1.0 (git+https://github.com/servo/media)",
@ -3858,10 +3853,33 @@ dependencies = [
"zip 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "servo-media-gstreamer-render"
version = "0.1.0"
source = "git+https://github.com/servo/media#04bfd8853b71f99a0fa226b21d7d5f923536ddf6"
dependencies = [
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-media-player 0.1.0 (git+https://github.com/servo/media)",
]
[[package]]
name = "servo-media-gstreamer-render-unix"
version = "0.1.0"
source = "git+https://github.com/servo/media#04bfd8853b71f99a0fa226b21d7d5f923536ddf6"
dependencies = [
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-gl 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-media-gstreamer-render 0.1.0 (git+https://github.com/servo/media)",
"servo-media-player 0.1.0 (git+https://github.com/servo/media)",
]
[[package]]
name = "servo-media-player"
version = "0.1.0"
source = "git+https://github.com/servo/media#a7e38bb566e81085eef9410b9dd6bd67873ffdd9"
source = "git+https://github.com/servo/media#04bfd8853b71f99a0fa226b21d7d5f923536ddf6"
dependencies = [
"ipc-channel 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3872,7 +3890,7 @@ dependencies = [
[[package]]
name = "servo-media-streams"
version = "0.1.0"
source = "git+https://github.com/servo/media#a7e38bb566e81085eef9410b9dd6bd67873ffdd9"
source = "git+https://github.com/servo/media#04bfd8853b71f99a0fa226b21d7d5f923536ddf6"
dependencies = [
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3881,7 +3899,7 @@ dependencies = [
[[package]]
name = "servo-media-webrtc"
version = "0.1.0"
source = "git+https://github.com/servo/media#a7e38bb566e81085eef9410b9dd6bd67873ffdd9"
source = "git+https://github.com/servo/media#04bfd8853b71f99a0fa226b21d7d5f923536ddf6"
dependencies = [
"boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3980,7 +3998,7 @@ dependencies = [
[[package]]
name = "servo_media_derive"
version = "0.1.0"
source = "git+https://github.com/servo/media#a7e38bb566e81085eef9410b9dd6bd67873ffdd9"
source = "git+https://github.com/servo/media#04bfd8853b71f99a0fa226b21d7d5f923536ddf6"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -5549,9 +5567,10 @@ dependencies = [
"checksum servo-freetype-sys 4.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d00ab791f66cd2ec58e72c91b6076cee20fac560463aa871404eb31dfc9c4ff"
"checksum servo-media 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-audio 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-auto 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-dummy 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-gstreamer 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-gstreamer-render 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-gstreamer-render-unix 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-player 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-streams 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-webrtc 0.1.0 (git+https://github.com/servo/media)" = "<none>"

View file

@ -1300,7 +1300,8 @@ impl HTMLMediaElement {
}
}
},
PlayerEvent::Error => {
PlayerEvent::Error(ref error) => {
error!("Player error: {:?}", error);
self.error.set(Some(&*MediaError::new(
&*window_from_node(self),
MEDIA_ERR_DECODE,

View file

@ -66,7 +66,6 @@ script_traits = {path = "../script_traits"}
servo_config = {path = "../config"}
servo_geometry = {path = "../geometry"}
servo-media = {git = "https://github.com/servo/media"}
servo-media-auto = {git = "https://github.com/servo/media"}
servo_url = {path = "../url"}
style = {path = "../style", features = ["servo"]}
style_traits = {path = "../style_traits", features = ["servo"]}
@ -78,3 +77,9 @@ webvr_traits = {path = "../webvr_traits"}
[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_arch="arm"), not(target_arch="aarch64")))'.dependencies]
gaol = {git = "https://github.com/servo/gaol"}
[target.'cfg(any(all(target_os = "android", target_arch = "arm"), target_arch = "x86_64"))'.dependencies.servo-media-gstreamer]
git = "https://github.com/servo/media"
[target.'cfg(not(any(all(target_os = "android", target_arch = "arm"), target_arch = "x86_64")))'.dependencies.servo-media-dummy]
git = "https://github.com/servo/media"

View file

@ -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,