gst/gst.c: Search for plugins on win32 based on the location of the gstreamer DLL...
authorDavid Schleef <ds@schleef.org>
Fri, 5 Dec 2008 20:32:03 +0000 (20:32 +0000)
committerDavid Schleef <ds@schleef.org>
Fri, 5 Dec 2008 20:32:03 +0000 (20:32 +0000)
Original commit message from CVS:
* gst/gst.c:
Search for plugins on win32 based on the location of the
gstreamer DLL.  Fixes #548786

ChangeLog
gst/gst.c

index b80e2f6..8bf1fa9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-05  David Schleef  <ds@schleef.org>
+
+       * gst/gst.c:
+       Search for plugins on win32 based on the location of the
+       gstreamer DLL.  Fixes #548786
+
 2008-12-04  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
 
        * configure.ac:
index d937ae1..85f87fc 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -719,6 +719,24 @@ scan_and_update_registry (GstRegistry * default_registry,
     /* add the main (installed) library path */
     GST_DEBUG ("scanning main plugins %s", PLUGINDIR);
     changed |= gst_registry_scan_path (default_registry, PLUGINDIR);
+
+#ifdef G_PLATFORM_WIN32
+    {
+      char *base_dir;
+      char *dir;
+
+      base_dir = g_win32_get_package_installation_directory (NULL,
+          "libgstreamer-0.10-0.dll");
+
+      dir = g_build_filename (base_dir, "lib", "gstreamer-0.10", NULL);
+      GST_DEBUG ("scanning DLL dir %s", dir);
+
+      changed |= gst_registry_scan_path (default_registry, dir);
+
+      g_free (dir);
+      g_free (base_dir);
+    }
+#endif
   } else {
     gchar **list;
     gint i;