MacOS has plugins under .so or under .dylib. Add detection for MacOS and handle this...
authorStefan Kost <ensonic@users.sourceforge.net>
Mon, 31 Mar 2008 13:47:22 +0000 (13:47 +0000)
committerStefan Kost <ensonic@users.sourceforge.net>
Mon, 31 Mar 2008 13:47:22 +0000 (13:47 +0000)
Original commit message from CVS:
* configure.ac:
* gst/gstregistry.c:
MacOS has plugins under .so or under .dylib. Add detection for MacOS
and handle this case.
* gst/gst.c:
Add a comment here describing, why we stat each plugin and not try to
be smart.

ChangeLog
configure.ac
gst/gst.c
gst/gstregistry.c

index 81f9a66..4a5ddf0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-03-31  Stefan Kost  <ensonic@users.sf.net>
+
+       * configure.ac:
+       * gst/gstregistry.c:
+         MacOS has plugins under .so or under .dylib. Add detection for MacOS
+         and handle this case.
+
+       * gst/gst.c:
+         Add a comment here describing, why we stat each plugin and not try to
+         be smart.
+
 2008-03-31  Sebastian Dröge  <slomo@circular-chaos.org>
 
        * libs/gst/base/gstbasetransform.c:
index 80305c0..dde119a 100644 (file)
@@ -223,6 +223,15 @@ else
 fi
 AC_SUBST(GST_HAVE_UNALIGNED_ACCESS_DEFINE)
 
+dnl check for extra platform specific plugin suffixes
+case $host_os in
+     darwin* | rhapsody*)
+       AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [.dylib], [Extra platform specific plugin suffix])
+       ;;
+     *)
+       ;;
+esac
+
 dnl * software *
 
 dnl check for large file support
index 09630ff..3e5ec8b 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -656,13 +656,17 @@ scan_and_update_registry (GstRegistry * default_registry,
   gboolean changed = FALSE;
   GList *l;
 
-  GST_INFO ("Validating registry cache");
+  GST_INFO ("Validating registry cache: %s", registry_file);
+  /* It sounds tempting to just compare the mtime of directories with the mtime
+   * of the registry cache, but it does not work. It would not catch updated
+   * plugins, which might bring more or less features.
+   */
 
   /* scan paths specified via --gst-plugin-path */
   GST_DEBUG ("scanning paths added via --gst-plugin-path");
   for (l = plugin_paths; l != NULL; l = l->next) {
     GST_INFO ("Scanning plugin path: \"%s\"", (gchar *) l->data);
-    /* CHECKME: add changed |= here as well? */
+    /* FIXME: add changed |= here as well? */
     gst_registry_scan_path (default_registry, (gchar *) l->data);
   }
   /* keep plugin_paths around in case a re-scan is forced later on */
index d48e98c..ac3fac2 100644 (file)
@@ -828,7 +828,11 @@ gst_registry_scan_path_level (GstRegistry * registry, const gchar * path,
       g_free (filename);
       continue;
     }
-    if (!g_str_has_suffix (filename, G_MODULE_SUFFIX)) {
+    if (!g_str_has_suffix (filename, G_MODULE_SUFFIX)
+#ifdef GST_EXTRA_MODULE_SUFFIX
+        || !g_str_has_suffix (filename, GST_EXTRA_MODULE_SUFFIX)
+#endif
+        ) {
       GST_LOG_OBJECT (registry,
           "extension is not recognized as module file, ignoring");
       g_free (filename);