rework configure.ac; make asterisk rtp stuff compile on mingw
authorThomas Vander Stichele <thomas@apestaart.org>
Mon, 14 Nov 2005 02:13:35 +0000 (02:13 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Mon, 14 Nov 2005 02:13:35 +0000 (02:13 +0000)
Original commit message from CVS:
rework configure.ac; make asterisk rtp stuff compile on mingw

59 files changed:
ChangeLog
common
configure.ac
ext/aalib/gstaasink.c
ext/cairo/gstcairo.c
ext/dv/gstdv.c
ext/esd/gstesd.c
ext/flac/gstflac.c
ext/gconf/gstgconfelements.c
ext/gdk_pixbuf/gstgdkpixbuf.c
ext/jpeg/gstjpeg.c
ext/ladspa/gstladspa.c
ext/libcaca/gstcacasink.c
ext/libmng/gstmng.c
ext/libpng/gstpng.c
ext/mikmod/gstmikmod.c
ext/pango/gsttextoverlay.c
ext/pango/gsttimeoverlay.c
ext/raw1394/gst1394.c
ext/speex/gstspeex.c
gst/alpha/Makefile.am
gst/alpha/gstalpha.c
gst/alpha/gstalphacolor.c
gst/auparse/gstauparse.c
gst/autodetect/gstautoaudiosink.c
gst/autodetect/gstautodetect.c
gst/avi/gstavi.c
gst/cutter/gstcutter.c
gst/debug/efence.c
gst/debug/gstdebug.c
gst/debug/gstnavigationtest.c
gst/effectv/gsteffectv.c
gst/flx/gstflxdec.c
gst/goom/gstgoom.c
gst/law/alaw.c
gst/law/mulaw.c
gst/level/gstlevel.c
gst/matroska/matroska.c
gst/median/gstmedian.c
gst/monoscope/gstmonoscope.c
gst/multipart/multipart.c
gst/oldcore/gstelements.c
gst/rtp/Makefile.am
gst/rtp/gstasteriskh263.c
gst/rtp/gstrtp.c
gst/rtsp/gstrtsp.c
gst/smoothwave/gstsmoothwave.c
gst/smpte/gstsmpte.c
gst/udp/gstudp.c
gst/videobox/gstvideobox.c
gst/videofilter/gstgamma.c
gst/videofilter/gstvideobalance.c
gst/videofilter/gstvideoflip.c
gst/videofilter/gstvideotemplate.c
gst/videomixer/videomixer.c
gst/wavenc/gstwavenc.c
gst/wavparse/gstwavparse.c
sys/oss/gstossaudio.c
sys/osxaudio/gstosxaudio.c

index 8d35224..19606d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,70 @@
+2005-11-14  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+       * configure.ac:
+         rework configure.ac file
+       * ext/aalib/gstaasink.c:
+       * ext/cairo/gstcairo.c:
+       * ext/dv/gstdv.c:
+       * ext/esd/gstesd.c:
+       * ext/flac/gstflac.c:
+       * ext/gconf/gstgconfelements.c:
+       * ext/gdk_pixbuf/gstgdkpixbuf.c:
+       * ext/jpeg/gstjpeg.c:
+       * ext/ladspa/gstladspa.c:
+       * ext/libcaca/gstcacasink.c:
+       * ext/libmng/gstmng.c:
+       * ext/libpng/gstpng.c:
+       * ext/mikmod/gstmikmod.c:
+       * ext/pango/gsttextoverlay.c:
+       * ext/pango/gsttimeoverlay.c:
+       * ext/raw1394/gst1394.c:
+       * ext/speex/gstspeex.c:
+       * gst/alpha/Makefile.am:
+       * gst/alpha/gstalpha.c:
+       * gst/alpha/gstalphacolor.c:
+       * gst/auparse/gstauparse.c:
+       * gst/autodetect/gstautoaudiosink.c:
+       (gst_auto_audio_sink_factory_filter),
+       (gst_auto_audio_sink_find_best), (gst_auto_audio_sink_detect):
+       * gst/autodetect/gstautodetect.c:
+       * gst/avi/gstavi.c:
+       * gst/cutter/gstcutter.c:
+       * gst/debug/efence.c:
+       * gst/debug/gstdebug.c:
+       * gst/debug/gstnavigationtest.c:
+       * gst/effectv/gsteffectv.c:
+       * gst/flx/gstflxdec.c:
+       * gst/goom/gstgoom.c:
+       * gst/interleave/plugin.c:
+       * gst/law/alaw.c:
+       * gst/law/mulaw.c:
+       * gst/level/gstlevel.c:
+       * gst/matroska/ebml-write.c: (gst_ebml_write_seek):
+       * gst/matroska/matroska.c:
+       * gst/median/gstmedian.c:
+       * gst/monoscope/gstmonoscope.c:
+       * gst/multipart/multipart.c:
+       * gst/oldcore/gstelements.c:
+       * gst/rtp/gstrtp.c:
+       * gst/rtsp/gstrtsp.c:
+       * gst/smoothwave/gstsmoothwave.c:
+       * gst/smpte/gstsmpte.c:
+       * gst/udp/gstudp.c:
+       * gst/videobox/gstvideobox.c:
+       * gst/videofilter/gstgamma.c:
+       * gst/videofilter/gstvideobalance.c:
+       * gst/videofilter/gstvideoflip.c:
+       * gst/videofilter/gstvideotemplate.c:
+       * gst/videomixer/videomixer.c:
+       * gst/wavenc/gstwavenc.c:
+       * gst/wavparse/gstwavparse.c:
+       * sys/oss/gstossaudio.c:
+       * sys/osxaudio/gstosxaudio.c:
+         update GST_PLUGIN_DEFINE
+       * gst/rtp/Makefile.am:
+       * gst/rtp/gstasteriskh263.c:
+         check for htons/htonl headers and possibly link to winsock2 lib
+
 2005-11-12  Edward Hervey  <edward@fluendo.com>
 
        * ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_chain): 
diff --git a/common b/common
index 959da4a..c6e5de7 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 959da4a43c2e6218eb4f43e8c7e29c1db4157db1
+Subproject commit c6e5de72d79afdcad7d7b3cf4a35305f7f3ddebc
index db468b4..21bf571 100644 (file)
@@ -1,26 +1,35 @@
-dnl autoconf configuration file for gst-plugins 
-AC_INIT
-AC_CANONICAL_TARGET
-
-dnl We disable static building for development, for time savings
-dnl this goes before AS_LIBTOOL to appease autoconf
-dnl *NOTE*: dnl this line before release, so release does static too
-AM_DISABLE_STATIC
+AC_PREREQ(2.52)
 
-dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
-AM_MAINTAINER_MODE
+dnl initialize autoconf
+dnl we don't specify PACKAGE and VERSION because AS_VERSION puts it together
+AC_INIT
 
 dnl when going to/from release please set the nano (fourth number) right !
 dnl releases only do Wall, cvs and prerelease does Werror too
 AS_VERSION(gst-plugins-good, GST_PLUGINS_GOOD_VERSION, 0, 9, 5, 1,
     GST_CVS="no", GST_CVS="yes")
 
-AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
+dnl can autoconf find the source ?
+AC_CONFIG_SRCDIR([gst/law/alaw.c])
+
+dnl define the output header for config
+AM_CONFIG_HEADER([config.h])
+
+dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
+AM_MAINTAINER_MODE
+
+dnl sets host_* variables
+AC_CANONICAL_HOST
+
+dnl initialize automake
+dnl FIXME: this is deprecated use, we should move PACKAGE and VERSION to
+dnl AC_INIT, but then we need to parse the version to pass to AS_VERSION
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
 
 dnl our libraries and install dirs use major.minor as a version
 GST_MAJORMINOR=$GST_PLUGINS_GOOD_VERSION_MAJOR.$GST_PLUGINS_GOOD_VERSION_MINOR
 dnl we override it here if we need to for the release candidate of new series
-GST_MAJORMINOR=0.9
+GST_MAJORMINOR=0.9
 AC_SUBST(GST_MAJORMINOR)
 
 dnl CURRENT, REVISION, AGE
@@ -33,234 +42,32 @@ AS_LIBTOOL(GST_PLUGINS_GOOD, 0, 0, 0)
 AS_LIBTOOL_TAGS([CXX])
 AM_PROG_LIBTOOL
 
-AC_CONFIG_SRCDIR([gst/law/alaw.c])
-AM_CONFIG_HEADER(config.h)
-
-dnl Add parameters for aclocal
-dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
-ACLOCAL_FLAGS="-I m4 -I common/m4"
-AC_SUBST(ACLOCAL_AMFLAGS, $ACLOCAL_FLAGS)
-
-AC_PROG_CC
-AM_PROG_CC_STDC
-AM_PROG_AS
-AS="${CC}"
-AS_PROG_OBJC
-
-dnl the gettext stuff needed
-AM_GNU_GETTEXT_VERSION(0.11.5)
-AM_GNU_GETTEXT([external])
-                                                                            
-GETTEXT_PACKAGE=gst-plugins-good-$GST_MAJORMINOR
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE",
-                  [gettext package name])
-
-dnl define LOCALEDIR in config.h
-AS_AC_EXPAND(LOCALEDIR, $datadir/locale)
-AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR",
-                   [gettext locale dir])
-
-dnl decide on error flags
-AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
-
-if test "x$GST_WALL" = "xyes"; then
-   GST_ERROR="$GST_ERROR -Wall"
-
-   if test "x$GST_CVS" = "xyes"; then
-     AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
-   fi
-fi
-
-dnl determine c++ compiler
-AC_PROG_CXX
-dnl determine if c++ is available on this system
-AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
-dnl determine c++ preprocessor
-AC_PROG_CXXCPP
-AC_ISC_POSIX
-
-AC_HEADER_STDC([])
-AC_C_INLINE
-AX_CREATE_STDINT_H
-
-dnl Check for malloc.h
-AC_CHECK_HEADER(malloc.h,[
-  AC_DEFINE(HAVE_MALLOC_H, 1, [whether malloc.h available])
-])
-
-dnl Check for a way to display the function name in debug output
-GST_CHECK_FUNCTION()
-
-dnl Check for FIONREAD ioctl declaration :
-GST_CHECK_FIONREAD()
-
-DEFAULT_AUDIOSINK="autoaudiosink"
-DEFAULT_VIDEOSINK="autovideosink"
-DEFAULT_AUDIOSRC="alsasrc"
-DEFAULT_VIDEOSRC="v4lsrc"
-DEFAULT_VISUALIZER="goom"
-case "$host" in 
-  *-sun-* | *pc-solaris* )
-    DEFAULT_AUDIOSRC="sunaudiosrc"
-    ;;
-  *-darwin* )
-    DEFAULT_AUDIOSRC="osxaudiosrc"
-    ;;
-esac
-
-AC_SUBST(DEFAULT_AUDIOSINK)
-AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSINK,"$DEFAULT_AUDIOSINK",[Default audio sink])
-AC_SUBST(DEFAULT_AUDIOSRC)
-AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSRC,"$DEFAULT_AUDIOSRC",[Default audio source])
-AC_SUBST(DEFAULT_VIDEOSINK)
-AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSINK,"$DEFAULT_VIDEOSINK",[Default video sink])
-AC_SUBST(DEFAULT_VIDEOSRC)
-AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSRC,"$DEFAULT_VIDEOSRC",[Default video source])
-AC_SUBST(DEFAULT_VISUALIZER)
-AC_DEFINE_UNQUOTED(DEFAULT_VISUALIZER,"$DEFAULT_VISUALIZER",[Default visualizer])
-
-dnl ############################################
-dnl # Super Duper options for plug-in building #
-dnl ############################################
-
-dnl ext plug-ins; plug-ins that have external dependencies
-GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
-[HAVE_EXTERNAL=yes],enabled,
-[
-  AC_MSG_WARN(building external plug-ins)
-  BUILD_EXTERNAL="yes"
-],[
-  AC_MSG_WARN(all plug-ins with external dependencies will not be built)
-  BUILD_EXTERNAL="no"
-])
-# make BUILD_EXTERNAL available to Makefile.am
-AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
-
-dnl ##############################
-dnl # Do automated configuration #
-dnl ##############################
-
-dnl Check for tools:
-dnl ================
+dnl *** autotools stuff ****
 
 dnl allow for different autotools
-AS_AUTOTOOLS_ALTERNATE()
-
-dnl modify pkg-config path
-AC_ARG_WITH(pkg-config-path, 
-   AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
-   [export PKG_CONFIG_PATH=${withval}])
-
-GST_DOCBOOK_CHECK()
-dnl check architecture
-GST_ARCH()
+AS_AUTOTOOLS_ALTERNATE
 
-dnl check for gconftool-2
-
-dnl this macro defines an am conditional, so it needs to be run always
-AM_GCONF_SOURCE_2
-
-translit(dnm, m, l) AM_CONDITIONAL(USE_GCONFTOOL, true)
-GST_CHECK_FEATURE(GCONFTOOL, [GConf schemas], , [
-  AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
-  if test x$GCONFTOOL = xno; then
-    AC_MSG_WARN(Not installing GConf schemas)
-    HAVE_GCONFTOOL="no"
-  else
-    HAVE_GCONFTOOL="yes"
-  fi
-  AC_SUBST(HAVE_GCONFTOOL)
-])
-
-dnl check for GConf libraries
-translit(dnm, m, l) AM_CONDITIONAL(USE_GCONF, true)
-GST_CHECK_FEATURE(GCONF, [GConf libraries], , [
-  PKG_CHECK_MODULES(GCONF, gconf-2.0, HAVE_GCONF="yes", HAVE_GCONF="no")
-  AC_SUBST(GCONF_CFLAGS)
-  AC_SUBST(GCONF_LIBS)
-])
-
-dnl check for gstreamer
-dnl uninstalled is selected preferentially -- see pkg-config(1)
-GST_REQ=0.9.0.1
-PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
-  HAVE_GST="yes", HAVE_GST="no")
-
-if test "x$HAVE_GST" = "xno"; then
-  AC_MSG_ERROR(no GStreamer found)
-fi
-
-GST_TOOLS_DIR=`pkg-config --variable=toolsdir gstreamer-$GST_MAJORMINOR`
-if test -z $GST_TOOLS_DIR; then
-  AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
-fi
-AC_SUBST(GST_TOOLS_DIR)
-
-dnl check for gstreamer-base; uninstalled is selected preferentially
-PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQ,
-  HAVE_GST_BASE="yes", HAVE_GST_BASE="no")
-
-if test "x$HAVE_GST_BASE" = "xno"; then
-  AC_MSG_ERROR(no GStreamer Base Libs found)
-fi
-
-AC_SUBST(GST_BASE_LIBS)
-AC_SUBST(GST_BASE_CFLAGS)
-
-dnl check for gstreamer-plugins-base; uinstalled is selected preferentially
-PKG_CHECK_MODULES(GST_PLUGINS_BASE,
-  gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ,
-  HAVE_GST_PLUGINS_BASE="yes", HAVE_GST_PLUGINS_BASE="no")
-
-if test "x$HAVE_GST_PLUGINS_BASE" = "xno"; then
-  AC_MSG_ERROR(no GStreamer Base Plugins development files found)
-fi
-
-AC_SUBST(GST_PLUGINS_BASE_LIBS)
-AC_SUBST(GST_PLUGINS_BASE_CFLAGS)
-
-PKG_CHECK_MODULES(GST_CHECK, gstreamer-check-$GST_MAJORMINOR >= $GST_REQ,
-  HAVE_GST_CHECK="yes", HAVE_GST_CHECK="no")
-
-AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
-AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
-
-dnl Determine endianness
-AC_C_BIGENDIAN
-
-dnl Check for fast float to int casting as defined in C99
-AC_C99_FUNC_LRINT()
-AC_C99_FUNC_LRINTF()
-
-dnl Check for essential libraries first:
-dnl ====================================
-
-GST_GLIB_CHECK([2.6])
+dnl Add parameters for aclocal
+AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
 
-dnl Check for additional libraries that we might use:
-dnl =================================================
+dnl set up gettext
+dnl the version check needs to stay here because autopoint greps for it
+AM_GNU_GETTEXT_VERSION([0.11.5])
+AM_GNU_GETTEXT([external])
+GST_GETTEXT([gst-plugins-good-$GST_MAJORMINOR])
 
-# we set the defaults always to make sure we have non-empty variables
-# for the Makefile
+dnl *** check for arguments to configure ***
 
-PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.0, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
-AC_SUBST(LIBOIL_CFLAGS)
-AC_SUBST(LIBOIL_LIBS)
-if test "x${HAVE_LIBOIL}" = xyes ; then
-  #AC_DEFINE_UNQUOTED(HAVE_LIBOIL, 1, [Define if liboil is being used])
-  true
-fi
+GST_ARG_DEBUG
+GST_ARG_PROFILING
+GST_ARG_VALGRIND
+GST_ARG_GCOV
 
-dnl ===========================================================================
-dnl ============================= gst plug-ins ================================
-dnl ===========================================================================
+GST_ARG_EXAMPLES
 
-plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
-AC_SUBST(plugindir)
-
-GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' -no-undefined"
-AC_SUBST(GST_PLUGIN_LDFLAGS)
+GST_ARG_WITH_PKG_CONFIG_PATH
+GST_ARG_WITH_PACKAGE_NAME([GStreamer Good Plug-ins])
+GST_ARG_WITH_PACKAGE_ORIGIN
 
 dnl these are all the gst plug-ins, compilable without additional libs
 dnl videofilter is at the top because others depend on it
@@ -286,13 +93,13 @@ GST_PLUGINS_ALL="\
                wavenc \
                wavparse \
                 "
-
 AC_SUBST(GST_PLUGINS_ALL)
 
 GST_PLUGINS_SELECTED=""
 
 AC_ARG_WITH(plugins,
-    AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile]),
+    AC_HELP_STRING([--with-plugins],
+      [comma-separated list of plug-ins to compile]),
     [for i in `echo $withval | tr , ' '`; do
         if echo $GST_PLUGINS_ALL | grep $i > /dev/null
         then
@@ -305,13 +112,149 @@ AC_ARG_WITH(plugins,
 
 AC_SUBST(GST_PLUGINS_SELECTED)
 
+dnl ext plug-ins; plug-ins that have external dependencies
+GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
+  [HAVE_EXTERNAL=yes], enabled,
+  [
+    AC_MSG_NOTICE(building external plug-ins)
+    BUILD_EXTERNAL="yes"
+  ],[
+    AC_MSG_NOTICE(all plug-ins with external dependencies will not be built)
+    BUILD_EXTERNAL="no"
+  ])
+AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
+
+dnl *** checks for platform ***
+
+dnl * hardware/architecture *
+
+dnl common/m4/gst-arch.m4
+dnl check CPU type
+GST_ARCH
+
+dnl Determine endianness
+AC_C_BIGENDIAN
+
+dnl *** checks for programs ***
+
+dnl find a compiler
+AC_PROG_CC
+
+dnl determine c++ compiler
+AC_PROG_CXX
+dnl determine if c++ is available on this system
+AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
+
+dnl determine c++ preprocessor
+dnl FIXME: do we need this ?
+AC_PROG_CXXCPP
+
+AS_PROG_OBJC
+
+AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
+AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
+
+dnl check for gconftool-2
+dnl this macro defines an am conditional, so it needs to be run always
+AM_GCONF_SOURCE_2
+
+dnl check for documentation tools
+GTK_DOC_CHECK([1.3])
+AS_PATH_PYTHON([2.1])
+
+dnl *** checks for header files ***
+
+dnl check if we have ANSI C header files
+AC_HEADER_STDC
+
+dnl used in gst/rtp/gstasteriskh263.c
+AC_CHECK_HEADERS([netinet/in.h])
+AC_CHECK_HEADERS([winsock2.h])
+AM_CONDITIONAL(HAVE_WINSOCK2_H, test "x$HAVE_WINSOCK2_H" = "xyes")
+
+dnl *** checks for compiler characteristics ***
+
+dnl FIXME: check if this is used; was used for floatcast.h in base
+dnl Check for fast float to int casting as defined in C99
+AC_C99_FUNC_LRINT
+AC_C99_FUNC_LRINTF
+
+dnl *** checks for library functions ***
+
 dnl Check for mmap (needed by electricfence plugin)
-AC_FUNC_MMAP()
+AC_FUNC_MMAP
 AM_CONDITIONAL(GST_HAVE_MMAP, test "x$ac_cv_func_mmap_fixed_mapped" == "xyes")
 
-dnl ==========================================================================
-dnl ============================= sys plug-ins ================================
-dnl ==========================================================================
+dnl *** checks for dependancy libraries ***
+
+dnl GLib is required
+GST_GLIB_CHECK([2.6])
+
+dnl liboil is required
+PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.2, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
+if test "x${HAVE_LIBOIL}" != xyes ; then
+  AC_ERROR([liboil-0.3 is required])
+fi
+
+dnl checks for gstreamer
+dnl uninstalled is selected preferentially -- see pkg-config(1)
+GST_REQ=0.9.5
+GSTPB_REQ=0.9.5
+GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
+GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
+GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ])
+GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ])
+GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
+GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ])
+
+GST_TOOLS_DIR=`pkg-config --variable=toolsdir gstreamer-$GST_MAJORMINOR`
+if test -z $GST_TOOLS_DIR; then
+  AC_MSG_ERROR([no tools dir defined in GStreamer pkg-config file; core upgrade needed.])
+fi
+AC_SUBST(GST_TOOLS_DIR)
+
+dnl FIXME: get rid of this by making sure gstreamer-check brings it in
+dnl check for "check", unit testing library/header
+AM_PATH_CHECK(0.9.2, HAVE_CHECK=yes, HAVE_CHECK=no)
+AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")
+
+dnl should we install schemas ?
+translit(dnm, m, l) AM_CONDITIONAL(USE_GCONFTOOL, true)
+GST_CHECK_FEATURE(GCONFTOOL, [GConf schemas], , [
+  AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
+  if test x$GCONFTOOL = xno; then
+    AC_MSG_WARN(Not installing GConf schemas)
+    HAVE_GCONFTOOL="no"
+  else
+    HAVE_GCONFTOOL="yes"
+  fi
+  AC_SUBST(HAVE_GCONFTOOL)
+])
+
+dnl *** set variables based on configure arguments ***
+
+dnl set license and copyright notice
+GST_LICENSE="LGPL"
+AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
+AC_SUBST(GST_LICENSE)
+
+dnl set location of plugin directory
+GST_SET_PLUGINDIR
+
+dnl define an ERROR_CFLAGS Makefile variable
+GST_SET_ERROR_CFLAGS($GST_CVS)
+
+dnl define correct level for debugging messages
+GST_SET_LEVEL_DEFAULT($GST_CVS)
+
+dnl used in examples
+GST_DEFAULT_ELEMENTS
+
+dnl *** sys plug-ins ***
+
+echo
+AC_MSG_NOTICE([Checking libraries for plugins in sys/])
+echo
 
 dnl *** OSS audio *** (Linux, *BSD)
 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
@@ -327,7 +270,8 @@ dnl Some old BSD versions :
      ], [
   dnl Some old BSD versions :
      AC_CHECK_HEADER(machine/soundcard.h, [
-       AC_DEFINE(HAVE_OSS_INCLUDE_IN_MACHINE,, [Define if OSS includes are in /machine/])
+       AC_DEFINE(HAVE_OSS_INCLUDE_IN_MACHINE,,
+         [Define if OSS includes are in /machine/])
        ], [
        HAVE_OSS="no"
      ])
@@ -335,9 +279,14 @@ dnl Some old BSD versions :
  ])
 ])
 
-dnl ###########################
-dnl # Configure external libs #
-dnl ###########################
+dnl *** ext plug-ins ***
+dnl keep this list sorted alphabetically !
+
+if test "x$BUILD_EXTERNAL" = "xyes"; then
+
+echo
+AC_MSG_NOTICE([Checking libraries for plugins in ext/])
+echo
 
 dnl *** aalib ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_AALIB, true)
@@ -385,6 +334,14 @@ GST_CHECK_FEATURE(FLAC, [FLAC lossless audio], flacenc flacdec, [
   AC_SUBST(FLAC_LIBS)
 ])
 
+dnl *** GConf ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_GCONF, true)
+GST_CHECK_FEATURE(GCONF, [GConf libraries], , [
+  PKG_CHECK_MODULES(GCONF, gconf-2.0, HAVE_GCONF="yes", HAVE_GCONF="no")
+  AC_SUBST(GCONF_CFLAGS)
+  AC_SUBST(GCONF_LIBS)
+])
+
 dnl *** jpeg ***
 dnl FIXME: we could use header checks here as well IMO
 translit(dnm, m, l) AM_CONDITIONAL(USE_JPEG, true)
@@ -405,7 +362,6 @@ GST_CHECK_FEATURE(JPEG, [jpeg], jpegenc jpegdec, [
   AC_SUBST(JPEG_LIBS)
 ])
 
-
 dnl *** ladspa ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
 GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
@@ -521,67 +477,46 @@ GST_CHECK_FEATURE(SPEEX, [speex plug-in], speex, [
   ])
 ])
 
-dnl also add builddir include for enumtypes and marshal
-GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS $GST_ERROR"
+fi dnl of EXT plugins
 
-AC_SUBST(GST_LIBS)
-AC_SUBST(GST_CFLAGS)
+dnl *** finalize CFLAGS, LDFLAGS, LIBS
 
-dnl check for "check", unit testing library/header
-AM_PATH_CHECK(0.9.2, HAVE_CHECK=yes, HAVE_CHECK=no)
-AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")
+dnl Overview:
+dnl GST_OPTION_CFLAGS:  common flags for profiling, debugging, errors, ...
+dnl GST_*:              flags shared by all built objects
+dnl GST_LT_LDFLAGS:     library versioning of our libraries
+dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
+
+dnl GST_OPTION_CFLAGS
+if test "x$USE_DEBUG" = xyes; then
+   PROFILE_CFLAGS="-g"
+fi
+AC_SUBST(PROFILE_CFLAGS)
 
-dnl ######################
-dnl # Checks for gtk-doc #
-dnl ######################
+DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
+AC_SUBST(DEPRECATED_CFLAGS)
 
-GTK_DOC_CHECK([1.3])
-AS_PATH_PYTHON([2.1])
+dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
+GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
+AC_SUBST(GST_OPTION_CFLAGS)
 
-dnl ############################
-dnl # Set up some more defines #
-dnl ############################
+dnl our libraries need to be versioned correctly
+AC_SUBST(GST_LT_LDFLAGS)
 
-dnl set license and copyright notice
-AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license])
-
-dnl package name in plugins
-AC_ARG_WITH(package-name,
-AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]),
-[case "${withval}" in
-  yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
-  no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
-  *) GST_PACKAGE="${withval}" ;;
-esac], 
-[
-dnl default value
-if test "x$GST_CVS" = "xyes"
-then
-  dnl nano >= 1
-  GST_PACKAGE="GStreamer CVS/prerelease"
-else
-  GST_PACKAGE="GStreamer source release"
-fi
-]
-)
-AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
-AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
-
-dnl package origin URL
-AC_ARG_WITH(package-origin,
-AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plugins]),
-[case "${withval}" in
-  yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
-  no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
-  *) GST_ORIGIN="${withval}" ;;
-esac], 
-[GST_ORIGIN="http://gstreamer.freedesktop.org/"]) dnl Default value
-AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
-AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
-
-dnl #########################
-dnl # Make the output files #
-dnl #########################
+dnl FIXME: do we want to rename to GST_ALL_* ?
+dnl prefer internal headers to already installed ones
+dnl also add builddir include for enumtypes and marshal
+dnl add ERROR_CFLAGS, but overridable
+GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
+AC_SUBST(GST_CFLAGS)
+AC_SUBST(GST_LIBS)
+
+dnl this really should only contain flags, not libs - they get added before
+dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
+GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' -no-undefined"
+AC_SUBST(GST_PLUGIN_LDFLAGS)
+
+dnl *** output files ***
 
 dnl keep this alphabetic per directory, please
 AC_CONFIG_FILES(
index 4463949..4d70e82 100644 (file)
@@ -547,4 +547,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "aasink",
     "ASCII Art video sink",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 953ec72..aac9725 100644 (file)
@@ -44,4 +44,4 @@ plugin_init (GstPlugin * plugin)
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, "cairo",
     "Cairo-based overlaying", plugin_init, VERSION,
-    GST_LICENSE, GST_PACKAGE, GST_ORIGIN);
+    GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
index 06bf482..55d5cf0 100644 (file)
@@ -43,4 +43,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "dv",
     "DV demuxer and decoder based on libdv (libdv.sf.net)",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN);
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
index 16bf9ff..c40b4cf 100644 (file)
@@ -56,4 +56,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "esdsink",
     "ESD Element Plugins",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 13464f2..6f853d5 100644 (file)
@@ -48,4 +48,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "flac",
     "The FLAC Lossless compressor Codec",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 1820c1f..e636278 100644 (file)
@@ -46,4 +46,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "gconfelements",
     "elements wrapping the GStreamer/GConf audio/video output settings",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index b144827..5846b18 100644 (file)
@@ -496,5 +496,5 @@ plugin_init (GstPlugin * plugin)
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "gdkpixbuf",
-    "GDK Pixbuf decoder & scaler", plugin_init, VERSION, "LGPL", GST_PACKAGE,
-    GST_ORIGIN)
+    "GDK Pixbuf decoder & scaler", plugin_init, VERSION, "LGPL",
+    GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index d1ea276..43d7cdf 100644 (file)
@@ -80,4 +80,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "jpeg",
     "JPeg plugin library",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index dbf9f93..c6d0e0b 100644 (file)
@@ -626,4 +626,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "ladspa",
     "All LADSPA plugins",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 7712ddc..6cdf835 100644 (file)
@@ -398,4 +398,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "cacasink",
     "Colored ASCII Art video sink",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index d84a71b..e57a219 100644 (file)
@@ -42,4 +42,5 @@ plugin_init (GstPlugin * plugin)
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "mng",
-    "MNG plugin library", plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    "MNG plugin library", plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME,
+    GST_PACKAGE_ORIGIN)
index d9bcd1b..d02bf0d 100644 (file)
@@ -42,4 +42,5 @@ plugin_init (GstPlugin * plugin)
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "png",
-    "PNG plugin library", plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    "PNG plugin library", plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME,
+    GST_PACKAGE_ORIGIN)
index 0e5c161..b9a70ac 100644 (file)
@@ -552,4 +552,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "mikmod",
     "Mikmod plugin library",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 807dac2..fae9c24 100644 (file)
@@ -804,4 +804,5 @@ plugin_init (GstPlugin * plugin)
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "textoverlay",
-    "Text overlay", plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    "Text overlay", plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME,
+    GST_PACKAGE_ORIGIN)
index ecbf3ca..7ad0807 100644 (file)
@@ -211,7 +211,8 @@ plugin_init (GstPlugin * plugin)
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "timeoverlay",
-    "Time overlay", plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    "Time overlay", plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME,
+    GST_PACKAGE_ORIGIN)
 
      static void gst_timeoverlay_setup (GstVideofilter * videofilter)
 {
index cd91a18..3143a59 100644 (file)
@@ -40,4 +40,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "1394",
     "Source for DV data via IEEE1394 interface",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN);
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
index 18e74b5..e77c9e3 100644 (file)
@@ -42,4 +42,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "speex",
     "Speex plugin library",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 95c565a..fd54707 100644 (file)
@@ -1,15 +1,13 @@
-
 plugin_LTLIBRARIES = libgstalpha.la libgstalphacolor.la
 
 libgstalpha_la_SOURCES = gstalpha.c
-libgstalpha_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+libgstalpha_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
+       $(GST_BASE_CFLAGS) $(GST_CFLAGS)
 libgstalpha_la_LIBADD = $(GST_LIBS)
 libgstalpha_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 
 libgstalphacolor_la_SOURCES = gstalphacolor.c
-libgstalphacolor_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
-                            $(GST_PLUGINS_BASE_CFLAGS)
+libgstalphacolor_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
+       $(GST_BASE_CFLAGS) $(GST_CFLAGS)
 libgstalphacolor_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
 libgstalphacolor_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-
-noinst_HEADERS = 
index 37724f3..566f2b6 100644 (file)
@@ -892,4 +892,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "alpha",
     "adds an alpha channel to video",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 5445629..9d28bbe 100644 (file)
@@ -286,4 +286,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "alphacolor",
     "RGB->YUV colorspace conversion preserving the alpha channels",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index f2f2f8a..82abd60 100644 (file)
@@ -411,4 +411,5 @@ plugin_init (GstPlugin * plugin)
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "auparse",
-    "parses au streams", plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    "parses au streams", plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME,
+    GST_PACKAGE_ORIGIN)
index 2becffc..afd7ba9 100644 (file)
@@ -108,7 +108,7 @@ gst_auto_audio_sink_factory_filter (GstPluginFeature * feature, gpointer data)
 
   /* audio sinks */
   klass = gst_element_factory_get_klass (GST_ELEMENT_FACTORY (feature));
-  if (strcmp (klass, "Sink/Audio") != 0)
+  if (!(strstr (klass, "Sink") && strstr (klass, "Audio")))
     return FALSE;
 
   /* only select elements with autoplugging rank */
@@ -137,6 +137,9 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink)
   GList *list, *item;
   GstElement *choice = NULL;
   gboolean ss = TRUE;
+  GstMessage *message = NULL;
+  GSList *errors = NULL;
+  GstBus *bus = gst_bus_new ();
 
   list = gst_registry_feature_filter (gst_registry_get_default (),
       (GstPluginFeatureFilter) gst_auto_audio_sink_factory_filter, FALSE, sink);
@@ -145,17 +148,21 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink)
   /* FIXME:
    * - soundservers have no priority yet.
    * - soundserversinks should only be chosen if already running, or if
-   *    the user explicitely wants this to run... That is not easy.
+   *    the user explicitly wants this to run... That is not easy.
    */
 
   while (1) {
-    GST_LOG ("Trying to find %s", ss ? "soundservers" : "audio devices");
+    GST_DEBUG_OBJECT (sink, "Trying to find %s",
+        ss ? "soundservers" : "audio devices");
 
     for (item = list; item != NULL; item = item->next) {
       GstElementFactory *f = GST_ELEMENT_FACTORY (item->data);
       GstElement *el;
 
       if ((el = gst_element_factory_create (f, "actual-sink"))) {
+        /* FIXME: no element actually has this property as far as I can tell.
+         * also, this is a nasty uncheckable way of supporting something that
+         * amounts to being an interface. */
         gboolean has_p = g_object_class_find_property (G_OBJECT_GET_CLASS (el),
             "soundserver-running") ? TRUE : FALSE;
 
@@ -165,22 +172,32 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink)
 
             g_object_get (G_OBJECT (el), "soundserver-running", &r, NULL);
             if (r) {
-              GST_LOG ("%s - soundserver is running",
+              GST_DEBUG_OBJECT (sink, "%s - soundserver is running",
                   GST_PLUGIN_FEATURE (f)->name);
             } else {
-              GST_LOG ("%s - Soundserver is not running",
+              GST_DEBUG_OBJECT (sink, "%s - Soundserver is not running",
                   GST_PLUGIN_FEATURE (f)->name);
               goto next;
             }
           }
-          GST_LOG ("Testing %s", GST_PLUGIN_FEATURE (f)->name);
+          GST_DEBUG_OBJECT (sink, "Testing %s", GST_PLUGIN_FEATURE (f)->name);
+          gst_element_set_bus (el, bus);
           if (gst_element_set_state (el,
                   GST_STATE_READY) == GST_STATE_CHANGE_SUCCESS) {
             gst_element_set_state (el, GST_STATE_NULL);
-            GST_LOG ("This worked!");
+            GST_DEBUG_OBJECT (sink, "This worked!");
             choice = el;
             goto done;
           } else {
+            /* collect all error messages */
+            while ((message = gst_bus_pop (bus))) {
+              if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR) {
+                GST_DEBUG_OBJECT (sink, "appending error message %p", message);
+                errors = g_slist_append (errors, message);
+              } else {
+                gst_message_unref (message);
+              }
+            }
             gst_element_set_state (el, GST_STATE_NULL);
           }
         }
@@ -196,7 +213,24 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink)
   }
 
 done:
+  GST_DEBUG_OBJECT (sink, "done trying");
+  if (!choice) {
+    if (errors) {
+      /* FIXME: we forward the first error for now; but later on it might make
+       * sense to actually analyse them */
+      gst_message_ref (GST_MESSAGE (errors->data));
+      GST_DEBUG_OBJECT (sink, "reposting message %p", errors->data);
+      gst_element_post_message (GST_ELEMENT (sink), GST_MESSAGE (errors->data));
+    } else {
+      /* general fallback */
+      GST_ELEMENT_ERROR (sink, LIBRARY, INIT, (NULL),
+          ("Failed to find a supported audio sink"));
+    }
+  }
+  gst_object_unref (bus);
   g_list_free (list);
+  g_slist_foreach (errors, (GFunc) gst_mini_object_unref, NULL);
+  g_slist_free (errors);
 
   return choice;
 }
@@ -216,8 +250,6 @@ gst_auto_audio_sink_detect (GstAutoAudioSink * sink)
   /* find element */
   GST_DEBUG_OBJECT (sink, "Creating new kid");
   if (!(esink = gst_auto_audio_sink_find_best (sink))) {
-    GST_ELEMENT_ERROR (sink, LIBRARY, INIT, (NULL),
-        ("Failed to find a supported audio sink"));
     return FALSE;
   }
   sink->kid = esink;
index 75f7d6e..9f02b9c 100644 (file)
@@ -45,4 +45,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "autodetect",
     "Plugin contains auto-detection plugins for video/audio outputs",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 91adeb4..51cfd46 100644 (file)
@@ -47,4 +47,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "avi",
     "AVI stream handling",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 89a5723..05ae543 100644 (file)
@@ -416,7 +416,7 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "cutter",
     "Audio Cutter to split audio into non-silent bits",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
 
      void gst_cutter_get_caps (GstPad * pad, GstCutter * filter)
 {
index a9d70c6..062fab8 100644 (file)
@@ -320,7 +320,7 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     "access to data in the buffer is more likely to cause segmentation "
     "faults.  This allocation method is very similar to the debugging tool "
     "\"Electric Fence\".",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
 
      static void gst_fenced_buffer_finalize (GstFencedBuffer * buffer)
 {
index 8c64588..958d472 100644 (file)
@@ -47,4 +47,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "debug",
     "elements for testing and debugging",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index de7d5e9..9b40fc1 100644 (file)
@@ -312,4 +312,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "navigationtest",
     "Template for a video filter",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index f7aa624..5a051b6 100644 (file)
@@ -82,4 +82,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "effectv",
     "effect plugins from the effectv project",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN);
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
index bb86916..1d50a9c 100644 (file)
@@ -669,4 +669,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "flxdec",
     "FLX video decoder",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 2592f85..a7e7708 100644 (file)
@@ -454,4 +454,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "goom",
     "GOOM visualization filter",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 252e3c8..fd481fa 100644 (file)
@@ -58,4 +58,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "alaw",
     "ALaw audio conversion routines",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 7b7d222..4a28806 100644 (file)
@@ -58,4 +58,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "mulaw",
     "MuLaw audio conversion routines",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 9a15caf..acd6067 100644 (file)
@@ -552,4 +552,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "level",
     "Audio level plugin",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN);
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
index b274b94..5156ca5 100644 (file)
@@ -37,4 +37,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "matroska",
     "Matroska stream handling",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 7bfa33a..4327c00 100644 (file)
@@ -430,4 +430,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "median",
     "Video median filter",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index f3916d4..4497d9c 100644 (file)
@@ -300,4 +300,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "monoscope",
     "Monoscope visualization",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN);
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
index 802653f..871f987 100644 (file)
@@ -41,4 +41,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "multipart",
     "multipart stream manipulation",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index dd832aa..e99c27c 100644 (file)
@@ -79,4 +79,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "standardelements",
     "standard GStreamer elements",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index b4af38f..877dbef 100644 (file)
@@ -20,9 +20,15 @@ libgstrtp_la_SOURCES = \
 
 #gstrtpL16enc.c gstrtpL16parse.c gstrtpgsmenc.c gstrtpgsmparse.c 
 
+if HAVE_WINSOCK2_H
+WINSOCK2_LIBS = -lws2_32
+else
+WINSOCK2_LIBS =
+endif
+
 libgstrtp_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
 libgstrtp_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) \
-                -lgstrtp-@GST_MAJORMINOR@
+                -lgstrtp-@GST_MAJORMINOR@ $(WINSOCK2_LIBS)
 libgstrtp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) 
 
 noinst_HEADERS = gstrtpL16enc.h        \
index 2c27e15..e38abea 100644 (file)
 #endif
 
 #include <string.h>
-#include <netinet/in.h>
 
 #include <gst/rtp/gstrtpbuffer.h>
 #include "gstasteriskh263.h"
 
+#ifdef HAVE_NETINET_IN_H
+#  include <netinet/in.h>
+#endif
+
+#ifdef HAVE_WINSOCK2_H
+#  include <winsock2.h>
+#endif
+
 #define GST_ASTERISKH263_HEADER_LEN 6
 
 typedef struct _GstAsteriskH263Header
index dd8457b..07a77e4 100644 (file)
@@ -92,4 +92,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "rtp",
     "Real-time protocol plugins",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 46d7949..8fe43ac 100644 (file)
@@ -37,4 +37,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "rtsp",
     "transfer data via RTSP",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 7063456..d544fc7 100644 (file)
@@ -443,4 +443,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "smoothwave",
     "Fading greyscale waveform display",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 1c1f325..31384ec 100644 (file)
@@ -491,4 +491,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "smpte",
     "Apply the standard SMPTE transitions on video images",
-    plugin_init, VERSION, "LGPL", GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 232d977..2852917 100644 (file)
@@ -51,4 +51,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "udp",
     "transfer data via UDP",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index d97fa29..315b3e2 100644 (file)
@@ -693,4 +693,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "videobox",
     "resizes a video by adding borders or cropping",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 72de4f8..fb47e4b 100644 (file)
@@ -274,7 +274,7 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "gamma",
     "Changes gamma on video images",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN);
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
 
 
 static void
index 65b64ae..0825aa4 100644 (file)
@@ -437,7 +437,7 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "videobalance",
     "Changes hue, saturation, brightness etc. on video images",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN);
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
 
 static void
 gst_videobalance_setup (GstVideofilter * videofilter)
index 4d6d37d..324934d 100644 (file)
@@ -231,7 +231,7 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "videoflip",
     "Flips and rotates video",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN);
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
 
 static void gst_videoflip_flip (GstVideoflip * videoflip,
     unsigned char *dest, unsigned char *src, int sw, int sh, int dw, int dh);
index 8009cd5..ac0b3e6 100644 (file)
@@ -225,7 +225,7 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "videotemplate",
     "Template for a video filter",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
 
      static void gst_videotemplate_setup (GstVideofilter * videofilter)
 {
index dff5366..8c8c978 100644 (file)
@@ -1203,4 +1203,5 @@ plugin_init (GstPlugin * plugin)
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "videomixer",
-    "Video mixer", plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    "Video mixer", plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME,
+    GST_PACKAGE_ORIGIN)
index 1cdde37..435db53 100644 (file)
@@ -694,4 +694,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "wavenc",
     "Encode raw audio into WAV",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index cb0ab68..fdfaba1 100644 (file)
@@ -1390,4 +1390,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "wavparse",
     "Parse a .wav file into raw audio",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index 1a5f051..165e693 100644 (file)
@@ -55,4 +55,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "ossaudio",
     "OSS (Open Sound System) support for GStreamer",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
index d3b6dd0..31f759b 100644 (file)
@@ -55,4 +55,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     "osxaudio",
     "OSX (Mac OS X) audio support for GStreamer",
-    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)