Auto merge of #27537 - jdm:armmedia, r=Manishearth

Use gstreamer on UWP targets

This fixes a regression that cause our arm64 builds to use the dummy media stack by default. Oops.

Fix #27531. Fix #27532.
This commit is contained in:
bors-servo 2020-08-07 10:29:16 -04:00 committed by GitHub
commit 8067a2fe94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -144,9 +144,8 @@ mod media_platform {
#[cfg(feature = "uwp")] #[cfg(feature = "uwp")]
fn set_gstreamer_log_handler() { fn set_gstreamer_log_handler() {
use gstreamer::{debug_add_log_function, debug_remove_default_log_function, DebugLevel}; use gstreamer::{debug_add_log_function, DebugLevel};
debug_remove_default_log_function();
debug_add_log_function(|cat, level, file, function, line, _, message| { debug_add_log_function(|cat, level, file, function, line, _, message| {
let message = format!( let message = format!(
"{:?} {:?} {:?}:{:?}:{:?} {:?}", "{:?} {:?} {:?}:{:?}:{:?} {:?}",

View file

@ -864,6 +864,7 @@ install them, let us know by filing a bug!")
not target not target
or ("armv7" in target and "android" in target) or ("armv7" in target and "android" in target)
or "x86_64" in target or "x86_64" in target
or "uwp" in target
): ):
media_stack = "gstreamer" media_stack = "gstreamer"
else: else:

View file

@ -287,6 +287,10 @@ Servo::Servo(std::optional<hstring> initUrl, hstring args, GLsizei width,
sServo = this; // FIXME; sServo = this; // FIXME;
auto current = ApplicationData::Current(); auto current = ApplicationData::Current();
auto gstLog = std::wstring(current.LocalFolder().Path()) + L"\\gst.log";
SetEnvironmentVariable(L"GST_DEBUG_FILE", gstLog.c_str());
// SetEnvironmentVariableA("GST_DEBUG", "4");
auto filePath = std::wstring(current.LocalFolder().Path()) + L"\\stdout.txt"; auto filePath = std::wstring(current.LocalFolder().Path()) + L"\\stdout.txt";
sLogHandle = sLogHandle =
CreateFile2(filePath.c_str(), GENERIC_WRITE, 0, CREATE_ALWAYS, nullptr); CreateFile2(filePath.c_str(), GENERIC_WRITE, 0, CREATE_ALWAYS, nullptr);