Load GStreamer plugins in UWP builds.

This commit is contained in:
Josh Matthews 2019-07-26 09:59:32 -04:00
parent 5d3d766204
commit bcbd425ef5

View file

@ -134,8 +134,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",