Mac OS X love...
authorJulien Moutte <julien@moutte.net>
Fri, 11 Apr 2008 09:27:44 +0000 (09:27 +0000)
committerJulien Moutte <julien@moutte.net>
Fri, 11 Apr 2008 09:27:44 +0000 (09:27 +0000)
Original commit message from CVS:
2008-04-11  Julien Moutte  <julien@fluendo.com>

Mac OS X love...
* configure.ac: Merge platform specific defines, introduce a new
define on OS X to remember that forking when updating registry is
unsafe.
* docs/faq/gst-uninstalled: Updated to include gst-libs in the bad
module.
* gst/gst.c: Don't fork when updating registry if GST_HAVE_UNSAFE_FORK
is defined.
* gst/gstregistry.c: (gst_registry_scan_path_level): Fixed a bogus
condition that leads to absolutely no plugins being registered on
OS X.

ChangeLog
configure.ac
docs/faq/gst-uninstalled
gst/gst.c
gst/gstregistry.c

index f2049f1..95cdbaf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2008-04-11  Julien Moutte  <julien@fluendo.com>
+
+        Mac OS X love...
+       * configure.ac: Merge platform specific defines, introduce a new
+       define on OS X to remember that forking when updating registry is
+       unsafe.
+       * docs/faq/gst-uninstalled: Updated to include gst-libs in the bad
+       module.
+       * gst/gst.c: Don't fork when updating registry if GST_HAVE_UNSAFE_FORK
+       is defined.
+       * gst/gstregistry.c: (gst_registry_scan_path_level): Fixed a bogus
+       condition that leads to absolutely no plugins being registered on
+       OS X.
+
 2008-04-10  Tim-Philipp Müller  <tim at centricular dot net>
 
        Based on patch by: José Alburquerque <jaalburqu at svn dot gnome dot org>
index 6613b1a..c0a25a4 100644 (file)
@@ -230,11 +230,19 @@ else
 fi
 AC_SUBST(GST_HAVE_UNALIGNED_ACCESS_DEFINE)
 
-dnl check for extra platform specific plugin suffixes
+dnl check for platform specific settings
 case $host_os in
-     darwin* | rhapsody*)
+     rhapsody*)
        AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [".dylib"], [Extra platform specific plugin suffix])
+        ;;
+     darwin*)
+       AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [".dylib"], [Extra platform specific plugin suffix])
+        AC_DEFINE_UNQUOTED(GST_HAVE_UNSAFE_FORK, 1, [Defined when registry scanning through fork is unsafe])
        ;;
+     cygwin* | mingw* | msvc* | mks*)
+        dnl HAVE_WIN32 currently means "disable POSIXisms".
+        AC_DEFINE_UNQUOTED(HAVE_WIN32, 1, [Defined if compiling for Windows])
+        ;;
      *)
        ;;
 esac
@@ -245,15 +253,6 @@ dnl check for large file support
 dnl affected plugins must include config.h
 AC_SYS_LARGEFILE
 
-dnl HAVE_WIN32 currently means "disable POSIXisms".
-case "$host" in
-  *-*-mingw*)
-    AC_DEFINE_UNQUOTED(HAVE_WIN32, 1, [Defined if compiling for Windows])
-    ;;
-  *)
-    ;;
-esac
-
 dnl *** checks for programs ***
 
 dnl find a compiler
index b764571..6cd34b5 100755 (executable)
@@ -52,11 +52,21 @@ PATH=$GST/gstreamer/tools:$GST/gst-plugins/tools:$GST/gst-player/src:$GST/gst-ed
 LD_LIBRARY_PATH=$GST/prefix/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
 DYLD_LIBRARY_PATH=$GST/prefix/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}
 
+# GStreamer plugins bad libraries
+for path in app
+do
+  LD_LIBRARY_PATH=$GST/gst-plugins-bad/gst-libs/gst/$path/.libs:$LD_LIBRARY_PATH
+  DYLD_LIBRARY_PATH=$GST/gst-plugins-bad/gst-libs/gst/$path/.libs:$DYLD_LIBRARY_PATH
+done
+
+# GStreamer plugins base libraries
 for path in audio cdda fft interfaces pbutils netbuffer riff rtp rtsp sdp tag utils video 
 do
   LD_LIBRARY_PATH=$GST/gst-plugins-base/gst-libs/gst/$path/.libs:$LD_LIBRARY_PATH
   DYLD_LIBRARY_PATH=$GST/gst-plugins-base/gst-libs/gst/$path/.libs:$DYLD_LIBRARY_PATH
 done
+
+# GStreamer core libraries
 for path in base net check controller dataprotocol
 do
   LD_LIBRARY_PATH=$GST/gstreamer/libs/gst/$path/.libs:$LD_LIBRARY_PATH
index 320506a..1355f9b 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -139,7 +139,7 @@ extern const gchar *priv_gst_dump_dot_dir;
 #endif
 
 /* defaults */
-#ifdef HAVE_FORK
+#if defined(HAVE_FORK) && !defined(GST_HAVE_UNSAFE_FORK)
 #define DEFAULT_FORK TRUE
 #else
 #define DEFAULT_FORK FALSE
index ac3fac2..d2aa37a 100644 (file)
@@ -830,7 +830,7 @@ gst_registry_scan_path_level (GstRegistry * registry, const gchar * path,
     }
     if (!g_str_has_suffix (filename, G_MODULE_SUFFIX)
 #ifdef GST_EXTRA_MODULE_SUFFIX
-        || !g_str_has_suffix (filename, GST_EXTRA_MODULE_SUFFIX)
+        && !g_str_has_suffix (filename, GST_EXTRA_MODULE_SUFFIX)
 #endif
         ) {
       GST_LOG_OBJECT (registry,