From: Stefan Kost Date: Mon, 31 Mar 2008 13:47:22 +0000 (+0000) Subject: MacOS has plugins under .so or under .dylib. Add detection for MacOS and handle this... X-Git-Tag: RELEASE-0_10_20~176 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4c170a205d4d694a485e6e7221ee526825053f9;p=platform%2Fupstream%2Fgstreamer.git MacOS has plugins under .so or under .dylib. Add detection for MacOS and handle this case. 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. --- diff --git a/ChangeLog b/ChangeLog index 81f9a66..4a5ddf0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-03-31 Stefan Kost + + * 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 * libs/gst/base/gstbasetransform.c: diff --git a/configure.ac b/configure.ac index 80305c0..dde119a 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/gst/gst.c b/gst/gst.c index 09630ff..3e5ec8b 100644 --- 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 */ diff --git a/gst/gstregistry.c b/gst/gstregistry.c index d48e98c..ac3fac2 100644 --- a/gst/gstregistry.c +++ b/gst/gstregistry.c @@ -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);