Auto merge of #23863 - jdm:gstreamer-uwp, r=ferjm

Various UWP GStreamer improvements

There are a number of positive changes in these commits:
* we successfully load GStreamer plugins in ARM64 UWP builds
* we correctly link the ARM64 ANGLE libraries when appropriate
* it is no longer necessary to manually set the LIB environment variable on Windows
* we automatically download and link against UWP-friendly GStreamer binaries when building with `--uwp`
* the use of vcruntime140.dll, msvcp140.dll and api-ms-win-crt-runtime-l1-1-0.dll in the UWP application has been removed and the build does not repackage them
* the set of base supporting GStreamer DLLs has been expanded to allow the gstlibav plugin to load correctly

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23742
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23863)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-07-27 12:03:11 -04:00 committed by GitHub
commit b9b01764fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 928 additions and 510 deletions

View file

@ -127,7 +127,8 @@ pub use servo_url as url;
#[cfg(any(
all(target_os = "android", target_arch = "arm"),
target_arch = "x86_64"
target_arch = "x86_64",
all(target_os = "windows", target_arch = "aarch64"),
))]
mod media_platform {
use super::ServoMedia;
@ -135,8 +136,15 @@ mod media_platform {
#[cfg(windows)]
pub fn init() {
let mut plugin_dir = std::env::current_exe().unwrap();
plugin_dir.pop();
// UWP apps have the working directory set appropriately. Win32 apps
// do not and need some assistance finding the DLLs.
let plugin_dir = if cfg!(feature = "uwp") {
std::path::PathBuf::new()
} else {
let mut plugin_dir = std::env::current_exe().unwrap();
plugin_dir.pop();
plugin_dir
};
let uwp_plugins = [
"gstapp.dll",
@ -201,7 +209,8 @@ mod media_platform {
#[cfg(not(any(
all(target_os = "android", target_arch = "arm"),
target_arch = "x86_64"
target_arch = "x86_64",
all(target_os = "windows", target_arch = "aarch64"),
)))]
mod media_platform {
use super::ServoMedia;