From 4e3f164f7bd020b1aed453ec11586cafd84e1a5d Mon Sep 17 00:00:00 2001 From: Alan Jeffrey Date: Fri, 17 May 2019 14:50:08 -0500 Subject: [PATCH 1/9] Allow mach build to explicitly set the media stack You can select the media backend by building as follows: $ ./mach build -d --media-stack=dummy or $ ./mach build -d --media-stack=gstreamer --- components/servo/Cargo.toml | 6 ++---- components/servo/lib.rs | 4 ++-- ports/glutin/Cargo.toml | 2 ++ python/servo/build_commands.py | 19 ++++++++++++++++++- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index f3e4cd086c5..f0eb9c892e8 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -71,6 +71,8 @@ script_traits = {path = "../script_traits"} servo_config = {path = "../config"} servo_geometry = {path = "../geometry"} servo-media = {git = "https://github.com/servo/media"} +servo-media-dummy = {git = "https://github.com/servo/media", optional = true} +servo-media-gstreamer = {git = "https://github.com/servo/media", optional = true} servo_url = {path = "../url"} sparkle = "0.1" style = {path = "../style", features = ["servo"]} @@ -90,10 +92,6 @@ gaol = "0.2.1" [target.'cfg(any(target_os = "android", target_arch = "x86_64", target_os = "windows"))'.dependencies] gstreamer = "0.14.5" -servo-media-gstreamer= {git = "https://github.com/servo/media"} - -[target.'cfg(not(any(target_os = "android", target_arch = "x86_64", target_os = "windows")))'.dependencies.servo-media-dummy] -git = "https://github.com/servo/media" [target.'cfg(target_os = "windows")'.dependencies] mozangle = {version = "0.2"} diff --git a/components/servo/lib.rs b/components/servo/lib.rs index e32c28ef740..e6a152dc15f 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -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(any(target_os = "android", target_arch = "x86_64", target_os = "windows",))] +#[cfg(feature = "servo-media-gstreamer")] mod media_platform { use super::ServoMedia; use servo_media_gstreamer::GStreamerBackend; @@ -245,7 +245,7 @@ mod media_platform { } } -#[cfg(not(any(target_os = "android", target_arch = "x86_64", target_os = "windows",)))] +#[cfg(feature = "servo-media-dummy")] mod media_platform { use super::ServoMedia; pub fn init() { diff --git a/ports/glutin/Cargo.toml b/ports/glutin/Cargo.toml index d4ad9f3a299..886f140b9b2 100644 --- a/ports/glutin/Cargo.toml +++ b/ports/glutin/Cargo.toml @@ -33,6 +33,8 @@ default = ["webdriver", "max_log_level"] egl = ["libservo/egl"] energy-profiling = ["libservo/energy-profiling"] debugmozjs = ["libservo/debugmozjs"] +media-dummy = ["libservo/servo-media-dummy"] +media-gstreamer = ["libservo/servo-media-gstreamer"] js_backtrace = ["libservo/js_backtrace"] layout-2013 = ["libservo/layout-2013"] layout-2020 = ["libservo/layout-2020"] diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index d4ac8d98b68..fc5cf912a52 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -155,6 +155,10 @@ class MachCommands(CommandBase): @CommandArgument('--jobs', '-j', default=None, help='Number of jobs to run in parallel') + @CommandArgument('--media-stack', + default=None, + choices=["gstreamer", "dummy"], + help='Which media stack to use') @CommandArgument('--no-package', action='store_true', help='For Android, disable packaging into a .apk after building') @@ -171,7 +175,7 @@ class MachCommands(CommandBase): @CommandArgument('params', nargs='...', help="Command-line arguments to be passed through to Cargo") @CommandBase.build_like_command_arguments - def build(self, release=False, dev=False, jobs=None, params=None, + def build(self, release=False, dev=False, jobs=None, params=None, media_stack=None, no_package=False, verbose=False, very_verbose=False, target=None, android=False, magicleap=False, libsimpleservo=False, features=None, uwp=False, win_arm64=False, **kwargs): @@ -191,6 +195,19 @@ class MachCommands(CommandBase): if not uwp: uwp = target and 'uwp' in target + # A guess about which platforms should use the gstreamer media stack + if not(media_stack): + if ( + not(target) or + ("armv7" in target and "android" in target) or + ("x86_64" in target) + ): + media_stack = "gstreamer" + else: + media_stack = "dummy" + + features += ["media-" + media_stack] + target_path = base_path = self.get_target_dir() if android: target_path = path.join(target_path, "android") From a3ef5944704831b3d1d21b7271940521ce50e4c7 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Tue, 5 Nov 2019 20:56:48 +0000 Subject: [PATCH 2/9] Pass feature list to build_env() --- python/servo/build_commands.py | 2 +- python/servo/command_base.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index fc5cf912a52..6ceb6f9574a 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -260,7 +260,7 @@ class MachCommands(CommandBase): check_call(["rustup" + BIN_SUFFIX, "target", "add", "--toolchain", self.toolchain(), target]) - env = self.build_env(target=target, is_build=True, uwp=uwp) + env = self.build_env(target=target, is_build=True, uwp=uwp, features=features) self.ensure_bootstrapped(target=target) self.ensure_clobbered() diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 2a82ec51612..c3119d5cfd3 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -562,9 +562,11 @@ class CommandBase(object): return self.get_executable(destination_folder) - def needs_gstreamer_env(self, target, env, uwp=False): + def needs_gstreamer_env(self, target, env, uwp=False, features=None): if uwp: return False + if "media-dummy" in features: + return False try: if check_gstreamer_lib(): return False @@ -620,7 +622,7 @@ install them, let us know by filing a bug!") 'vcdir': vcinstalldir, } - def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit=False, uwp=False): + def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit=False, uwp=False, features=None): """Return an extended environment dictionary.""" env = os.environ.copy() if sys.platform == "win32" and type(env['PATH']) == unicode: @@ -670,7 +672,7 @@ install them, let us know by filing a bug!") # Always build harfbuzz from source env["HARFBUZZ_SYS_NO_PKG_CONFIG"] = "true" - if is_build and self.needs_gstreamer_env(target or host_triple(), env, uwp): + if is_build and self.needs_gstreamer_env(target or host_triple(), env, uwp, features): gstpath = gstreamer_root(target or host_triple(), env, self.get_top_dir()) extra_path += [path.join(gstpath, "bin")] libpath = path.join(gstpath, "lib") From 528322cfeda7e4f27935fef85f6bb0927471793d Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 13 Nov 2019 00:59:29 +0000 Subject: [PATCH 3/9] Fix needs_gstreamer_env() signature Use iterable default value for `features`. --- python/servo/command_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/servo/command_base.py b/python/servo/command_base.py index c3119d5cfd3..42385ff4e38 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -562,7 +562,7 @@ class CommandBase(object): return self.get_executable(destination_folder) - def needs_gstreamer_env(self, target, env, uwp=False, features=None): + def needs_gstreamer_env(self, target, env, uwp=False, features=[]): if uwp: return False if "media-dummy" in features: From c7ac4bbb19ca01436c960dfc76d06c4278043003 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Fri, 15 Nov 2019 22:10:08 +0000 Subject: [PATCH 4/9] simpleservo: add media-{dummy,gstreamer} features --- ports/libsimpleservo/api/Cargo.toml | 2 ++ ports/libsimpleservo/capi/Cargo.toml | 2 ++ ports/libsimpleservo/jniapi/Cargo.toml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/ports/libsimpleservo/api/Cargo.toml b/ports/libsimpleservo/api/Cargo.toml index ce9c10bac1c..1a50e28ad03 100644 --- a/ports/libsimpleservo/api/Cargo.toml +++ b/ports/libsimpleservo/api/Cargo.toml @@ -35,6 +35,8 @@ canvas2d-azure = ["libservo/canvas2d-azure"] canvas2d-raqote = ["libservo/canvas2d-raqote"] default = ["webdriver", "max_log_level"] debugmozjs = ["libservo/debugmozjs"] +media-dummy = ["libservo/servo-media-dummy"] +media-gstreamer = ["libservo/servo-media-gstreamer"] egl = ["libservo/egl"] energy-profiling = ["libservo/energy-profiling"] googlevr = ["libservo/googlevr"] diff --git a/ports/libsimpleservo/capi/Cargo.toml b/ports/libsimpleservo/capi/Cargo.toml index 62c8b31632e..1e0850dc22a 100644 --- a/ports/libsimpleservo/capi/Cargo.toml +++ b/ports/libsimpleservo/capi/Cargo.toml @@ -31,6 +31,8 @@ canvas2d-azure = ["simpleservo/canvas2d-azure"] canvas2d-raqote = ["simpleservo/canvas2d-raqote"] debugmozjs = ["simpleservo/debugmozjs"] default = ["webdriver", "max_log_level"] +media-dummy = ["simpleservo/media-dummy"] +media-gstreamer = ["simpleservo/media-gstreamer"] egl = ["simpleservo/egl"] energy-profiling = ["simpleservo/energy-profiling"] googlevr = ["simpleservo/googlevr"] diff --git a/ports/libsimpleservo/jniapi/Cargo.toml b/ports/libsimpleservo/jniapi/Cargo.toml index d0e61568e60..953b1c1a4eb 100644 --- a/ports/libsimpleservo/jniapi/Cargo.toml +++ b/ports/libsimpleservo/jniapi/Cargo.toml @@ -31,6 +31,8 @@ canvas2d-azure = ["simpleservo/canvas2d-azure"] canvas2d-raqote = ["simpleservo/canvas2d-raqote"] debugmozjs = ["simpleservo/debugmozjs"] default = ["webdriver", "max_log_level"] +media-dummy = ["simpleservo/media-dummy"] +media-gstreamer = ["simpleservo/media-gstreamer"] egl = ["simpleservo/egl"] energy-profiling = ["simpleservo/energy-profiling"] googlevr = ["simpleservo/googlevr"] From 01a99b5cbe75146c5ec38a2947fb36ab7429237c Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sun, 17 Nov 2019 16:10:54 +0000 Subject: [PATCH 5/9] Make gstreamer(-sys) optional --- components/servo/Cargo.toml | 6 +++--- components/servo/lib.rs | 4 ++-- ports/glutin/Cargo.toml | 4 ++-- ports/libsimpleservo/api/Cargo.toml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index f0eb9c892e8..458ffb114a0 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -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"} diff --git a/components/servo/lib.rs b/components/servo/lib.rs index e6a152dc15f..d201bc2d757 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -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() { diff --git a/ports/glutin/Cargo.toml b/ports/glutin/Cargo.toml index 886f140b9b2..69c71acb509 100644 --- a/ports/glutin/Cargo.toml +++ b/ports/glutin/Cargo.toml @@ -33,8 +33,8 @@ default = ["webdriver", "max_log_level"] egl = ["libservo/egl"] energy-profiling = ["libservo/energy-profiling"] debugmozjs = ["libservo/debugmozjs"] -media-dummy = ["libservo/servo-media-dummy"] -media-gstreamer = ["libservo/servo-media-gstreamer"] +media-dummy = ["libservo/media-dummy"] +media-gstreamer = ["libservo/media-gstreamer"] js_backtrace = ["libservo/js_backtrace"] layout-2013 = ["libservo/layout-2013"] layout-2020 = ["libservo/layout-2020"] diff --git a/ports/libsimpleservo/api/Cargo.toml b/ports/libsimpleservo/api/Cargo.toml index 1a50e28ad03..d681fb59b07 100644 --- a/ports/libsimpleservo/api/Cargo.toml +++ b/ports/libsimpleservo/api/Cargo.toml @@ -35,8 +35,8 @@ canvas2d-azure = ["libservo/canvas2d-azure"] canvas2d-raqote = ["libservo/canvas2d-raqote"] default = ["webdriver", "max_log_level"] debugmozjs = ["libservo/debugmozjs"] -media-dummy = ["libservo/servo-media-dummy"] -media-gstreamer = ["libservo/servo-media-gstreamer"] +media-dummy = ["libservo/media-dummy"] +media-gstreamer = ["libservo/media-gstreamer"] egl = ["libservo/egl"] energy-profiling = ["libservo/energy-profiling"] googlevr = ["libservo/googlevr"] From ba3169e65d673f019ad1d59f24598d9e2eaae455 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sun, 17 Nov 2019 23:48:15 +0000 Subject: [PATCH 6/9] Implement `./mach doc --media-stack={dummy|gstreamer}` --- python/servo/post_build_commands.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index 4c3b6aba3c5..382f22ac0f5 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -238,8 +238,13 @@ class PostBuildCommands(CommandBase): @CommandArgument( 'params', nargs='...', help="Command-line arguments to be passed through to cargo doc") + @CommandArgument('--media-stack', + default=None, + choices=["gstreamer", "dummy"], + help='Which media stack to use') @CommandBase.build_like_command_arguments - def doc(self, params, features, **kwargs): + def doc(self, params, features, target=None, android=False, magicleap=False, + media_stack=None, **kwargs): env = os.environ.copy() env["RUSTUP_TOOLCHAIN"] = self.toolchain() rustc_path = check_output(["rustup" + BIN_SUFFIX, "which", "rustc"], env=env) @@ -268,6 +273,22 @@ class PostBuildCommands(CommandBase): copy2(full_name, destination) features = features or [] + + target, android = self.pick_target_triple(target, android, magicleap) + + # A guess about which platforms should use the gstreamer media stack + if not(media_stack): + if ( + not(target) or + ("armv7" in target and "android" in target) or + ("x86_64" in target) + ): + media_stack = "gstreamer" + else: + media_stack = "dummy" + + features += ["media-" + media_stack] + returncode = self.run_cargo_build_like_command("doc", params, features=features, **kwargs) if returncode: return returncode From d641585679344796c39a7562fa844bb836da4f21 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Tue, 19 Nov 2019 15:10:47 +0000 Subject: [PATCH 7/9] Implement `./mach check --media-stack` While at it, extract --media-stack flag into command_base.py. --- python/servo/build_commands.py | 4 ---- python/servo/command_base.py | 6 ++++++ python/servo/devenv_commands.py | 22 ++++++++++++++++++++-- python/servo/post_build_commands.py | 4 ---- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 6ceb6f9574a..effcd8676c5 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -155,10 +155,6 @@ class MachCommands(CommandBase): @CommandArgument('--jobs', '-j', default=None, help='Number of jobs to run in parallel') - @CommandArgument('--media-stack', - default=None, - choices=["gstreamer", "dummy"], - help='Which media stack to use') @CommandArgument('--no-package', action='store_true', help='For Android, disable packaging into a .apk after building') diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 42385ff4e38..f9a01bbb4af 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -792,6 +792,12 @@ install them, let us know by filing a bug!") default=None, help='Cross compile for given target platform', ), + CommandArgument( + '--media-stack', + default=None, + choices=["gstreamer", "dummy"], + help='Which media stack to use', + ), CommandArgument( '--android', default=None, diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index 78f6e2ce392..1a29fc5f118 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -38,16 +38,34 @@ class MachCommands(CommandBase): 'params', default=None, nargs='...', help="Command-line arguments to be passed through to cargo check") @CommandBase.build_like_command_arguments - def check(self, params, **kwargs): + def check(self, params, features=[], media_stack=None, target=None, + android=False, magicleap=False, **kwargs): if not params: params = [] + features = features or [] + + target, android = self.pick_target_triple(target, android, magicleap) + + # A guess about which platforms should use the gstreamer media stack + if not(media_stack): + if ( + not(target) or + ("armv7" in target and "android" in target) or + ("x86_64" in target) + ): + media_stack = "gstreamer" + else: + media_stack = "dummy" + + features += ["media-" + media_stack] + self.ensure_bootstrapped() self.ensure_clobbered() env = self.build_env() build_start = time() - status = self.run_cargo_build_like_command("check", params, env=env, **kwargs) + status = self.run_cargo_build_like_command("check", params, env=env, features=features, **kwargs) elapsed = time() - build_start notify_build_done(self.config, elapsed, status == 0) diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index 382f22ac0f5..4cc7e69318f 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -238,10 +238,6 @@ class PostBuildCommands(CommandBase): @CommandArgument( 'params', nargs='...', help="Command-line arguments to be passed through to cargo doc") - @CommandArgument('--media-stack', - default=None, - choices=["gstreamer", "dummy"], - help='Which media stack to use') @CommandBase.build_like_command_arguments def doc(self, params, features, target=None, android=False, magicleap=False, media_stack=None, **kwargs): From 6d8f35c590532bf8b7892833692500878a905b3e Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Tue, 19 Nov 2019 16:00:58 +0000 Subject: [PATCH 8/9] Allow media_stack in run_cargo_build_like_command --- python/servo/command_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/servo/command_base.py b/python/servo/command_base.py index f9a01bbb4af..e1b8695ec5f 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -868,7 +868,7 @@ install them, let us know by filing a bug!") target=None, android=False, magicleap=False, libsimpleservo=False, features=None, debug_mozjs=False, with_debug_assertions=False, with_frame_pointer=False, with_raqote=False, with_layout_2020=False, without_wgl=False, - uwp=False, + uwp=False, media_stack=None, ): env = env or self.build_env() target, android = self.pick_target_triple(target, android, magicleap) From 81c439a8990caf498bd3318cbe5f51c33830f7e3 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 20 Nov 2019 13:24:21 +0000 Subject: [PATCH 9/9] Extract media_stack pick into CommandBase --- python/servo/build_commands.py | 13 +------------ python/servo/command_base.py | 13 +++++++++++++ python/servo/devenv_commands.py | 13 +------------ python/servo/post_build_commands.py | 13 +------------ 4 files changed, 16 insertions(+), 36 deletions(-) diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index effcd8676c5..8f462939b5b 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -191,18 +191,7 @@ class MachCommands(CommandBase): if not uwp: uwp = target and 'uwp' in target - # A guess about which platforms should use the gstreamer media stack - if not(media_stack): - if ( - not(target) or - ("armv7" in target and "android" in target) or - ("x86_64" in target) - ): - media_stack = "gstreamer" - else: - media_stack = "dummy" - - features += ["media-" + media_stack] + features += self.pick_media_stack(media_stack, target) target_path = base_path = self.get_target_dir() if android: diff --git a/python/servo/command_base.py b/python/servo/command_base.py index e1b8695ec5f..5a8818333a9 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -862,6 +862,19 @@ install them, let us know by filing a bug!") android = self.handle_android_target(target) return target, android + # A guess about which platforms should use the gstreamer media stack + def pick_media_stack(self, media_stack, target): + if not(media_stack): + if ( + not(target) or + ("armv7" in target and "android" in target) or + ("x86_64" in target) + ): + media_stack = "gstreamer" + else: + media_stack = "dummy" + return ["media-" + media_stack] + def run_cargo_build_like_command( self, command, cargo_args, env=None, verbose=False, diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index 1a29fc5f118..45a3f946f38 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -47,18 +47,7 @@ class MachCommands(CommandBase): target, android = self.pick_target_triple(target, android, magicleap) - # A guess about which platforms should use the gstreamer media stack - if not(media_stack): - if ( - not(target) or - ("armv7" in target and "android" in target) or - ("x86_64" in target) - ): - media_stack = "gstreamer" - else: - media_stack = "dummy" - - features += ["media-" + media_stack] + features += self.pick_media_stack(media_stack, target) self.ensure_bootstrapped() self.ensure_clobbered() diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index 4cc7e69318f..a6ab4de647c 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -272,18 +272,7 @@ class PostBuildCommands(CommandBase): target, android = self.pick_target_triple(target, android, magicleap) - # A guess about which platforms should use the gstreamer media stack - if not(media_stack): - if ( - not(target) or - ("armv7" in target and "android" in target) or - ("x86_64" in target) - ): - media_stack = "gstreamer" - else: - media_stack = "dummy" - - features += ["media-" + media_stack] + features += self.pick_media_stack(media_stack, target) returncode = self.run_cargo_build_like_command("doc", params, features=features, **kwargs) if returncode: