audio: Use LoadPackagedLibrary when building for UWP

Universal Windows Platform apps are not allowed to use LoadLibrary to
load arbitrary DLLs from the filesystem. They can only use
LoadPackagedLibrary to load DLLs that have been packaged with the app
as assets.

See also: https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/190
This commit is contained in:
Nirbheek Chauhan 2019-05-10 07:32:21 +05:30 committed by Nirbheek Chauhan
parent dfe06287d6
commit 6f7c9e43bc

View file

@ -238,7 +238,11 @@ __gst_audio_init_thread_priority (void)
return _gst_audio_avrt_tbl.dll != NULL;
if (!_gst_audio_avrt_tbl.dll)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
_gst_audio_avrt_tbl.dll = LoadPackagedLibrary (TEXT ("avrt.dll"), 0);
#else
_gst_audio_avrt_tbl.dll = LoadLibrary (TEXT ("avrt.dll"));
#endif
if (!_gst_audio_avrt_tbl.dll) {
GST_WARNING ("Failed to set thread priority, can't find avrt.dll");