Skip to content

Commit 1a8c5fe

Browse files
committed
Add .servobuild configuration for the choice of media stack
1 parent 637c6c0 commit 1a8c5fe

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

python/servo/command_base.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ def resolverelative(category, key):
304304
self.config["build"].setdefault("debug-assertions", False)
305305
self.config["build"].setdefault("debug-mozjs", False)
306306
self.config["build"].setdefault("layout-2020", False)
307+
self.config["build"].setdefault("media-stack", "auto")
307308
self.config["build"].setdefault("ccache", "")
308309
self.config["build"].setdefault("rustflags", "")
309310
self.config["build"].setdefault("incremental", None)
@@ -856,11 +857,13 @@ def pick_target_triple(self, target, android, magicleap):
856857

857858
# A guess about which platforms should use the gstreamer media stack
858859
def pick_media_stack(self, media_stack, target):
859-
if not(media_stack):
860-
if (
861-
not(target)
862-
or ("armv7" in target and "android" in target)
863-
or ("x86_64" in target)
860+
if not media_stack:
861+
if self.config["build"]["media-stack"] != "auto":
862+
media_stack = self.config["build"]["media-stack"]
863+
elif (
864+
not target
865+
or ("armv7" in target and "android" in target)
866+
or "x86_64" in target
864867
):
865868
media_stack = "gstreamer"
866869
else:

servobuild.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ dom-backtrace = false
4646
# Default to the “2020” implementation of CSS layout instead of the “2013” one.
4747
layout-2020 = false
4848

49+
# Pick a media stack based on the target. Other values are "gstreamer" and "dummy"
50+
media-stack = "auto"
51+
4952
# Set to the path to your ccache binary to enable caching of compiler outputs
5053
#ccache = "/usr/local/bin/ccache"
5154

0 commit comments

Comments
 (0)