Make gstreamer(-sys) optional

This commit is contained in:
Tuncer Ayaz 2019-11-17 16:10:54 +00:00
parent c7ac4bbb19
commit 01a99b5cbe
4 changed files with 9 additions and 9 deletions

View file

@ -36,6 +36,8 @@ webgl_backtrace = [
"canvas_traits/webgl_backtrace",
]
vslatestinstalled = ["script/vslatestinstalled"]
media-dummy = ["servo-media-dummy"]
media-gstreamer = ["servo-media-gstreamer", "gstreamer"]
[dependencies]
background_hang_monitor = {path = "../background_hang_monitor"}
@ -86,12 +88,10 @@ webvr_traits = {path = "../webvr_traits"}
webxr-api = {git = "https://github.com/servo/webxr"}
webxr = {git = "https://github.com/servo/webxr"}
surfman = { version = "0.1", features = ["sm-osmesa"] }
gstreamer = { version = "0.14.5", optional = true }
[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 = "0.2.1"
[target.'cfg(any(target_os = "android", target_arch = "x86_64", target_os = "windows"))'.dependencies]
gstreamer = "0.14.5"
[target.'cfg(target_os = "windows")'.dependencies]
mozangle = {version = "0.2"}

View file

@ -135,7 +135,7 @@ pub use msg::constellation_msg::TopLevelBrowsingContextId as BrowserId;
pub use servo_config as config;
pub use servo_url as url;
#[cfg(feature = "servo-media-gstreamer")]
#[cfg(feature = "media-gstreamer")]
mod media_platform {
use super::ServoMedia;
use servo_media_gstreamer::GStreamerBackend;
@ -245,7 +245,7 @@ mod media_platform {
}
}
#[cfg(feature = "servo-media-dummy")]
#[cfg(feature = "media-dummy")]
mod media_platform {
use super::ServoMedia;
pub fn init() {