gstplugin: Don't stat plugins when building for UWP
authorNirbheek Chauhan <nirbheek@centricular.com>
Mon, 6 May 2019 13:49:47 +0000 (19:19 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Fri, 28 Jun 2019 08:14:49 +0000 (13:44 +0530)
commit5f89225bc2766b6cfb4ce1d5a09a0e8276e02d1e
tree241698f2c7e0490449f6c5993abe731e50a94168
parent9b7eaa3ed5e93f7f95ba6e1b987b1248049fa606
gstplugin: Don't stat plugins when building for UWP

When using GStreamer with Universal Windows Platform apps, dynamic
plugins can only be loaded by filename (without a path) using
gst_plugin_load_file() which will call into g_module_open().

On Windows, GModule calls LoadLibrary() on the filename, but with
UWP we need to use LoadPackagedLibrary() which is basically the same
as LoadLibrary(), except it looks only for DLLs (by name) that have
been packaged as assets with the app.

These assets are not files and cannot be accessed using normal file
APIs such as open() or stat().

The upstream glib merge request for adding LoadPackagedLibrary support
is: https://gitlab.gnome.org/GNOME/glib/merge_requests/951

NOTE: Whitespcae removal is to make gst-indent happy
gst/gstplugin.c