From 224b878ff77002663fb2a2dd3051bfad73924507 Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Fri, 11 Apr 2008 09:27:44 +0000 Subject: [PATCH] Mac OS X love... Original commit message from CVS: 2008-04-11 Julien Moutte 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 | 14 ++++++++++++++ configure.ac | 21 ++++++++++----------- docs/faq/gst-uninstalled | 10 ++++++++++ gst/gst.c | 2 +- gst/gstregistry.c | 2 +- 5 files changed, 36 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2049f1710..95cdbaf476 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2008-04-11 Julien Moutte + + 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 Based on patch by: José Alburquerque diff --git a/configure.ac b/configure.ac index 6613b1af8a..c0a25a484e 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/docs/faq/gst-uninstalled b/docs/faq/gst-uninstalled index b764571155..6cd34b5f7e 100755 --- a/docs/faq/gst-uninstalled +++ b/docs/faq/gst-uninstalled @@ -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 diff --git a/gst/gst.c b/gst/gst.c index 320506a1dc..1355f9bc4e 100644 --- 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 diff --git a/gst/gstregistry.c b/gst/gstregistry.c index ac3fac2a18..d2aa37a5bc 100644 --- a/gst/gstregistry.c +++ b/gst/gstregistry.c @@ -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,