--- gnome-settings-daemon/actions/acme-volume-gstreamer.c	2005-06-27 05:08:04.000000000 -0500
+++ gnome-settings-daemon/actions/acme-volume-gstreamer.c	2006-01-11 01:47:16.000000000 -0600
@@ -27,9 +27,15 @@
 #include "config.h"
 #include "acme-volume-gstreamer.h"
 
+#ifdef HAVE_GST10
+#include <gst/gst.h>
+#include <gst/interfaces/mixer.h>
+#include <gst/interfaces/propertyprobe.h>
+#else
 #include <gst/gst.h>
 #include <gst/mixer/mixer.h>
 #include <gst/propertyprobe/propertyprobe.h>
+#endif
 
 #include <string.h>
 
@@ -214,6 +220,43 @@
 	return FALSE;
 }
 
+#ifdef HAVE_GST10
+/*
+ * _acme_set_mixer
+ * Arguments: mixer - pointer to mixer element
+ *            data - pointer to user data (AcmeVolumeGStreamer to be modified)
+ * Returns: gboolean indicating success
+ */
+static gboolean
+_acme_set_mixer(GstMixer *mixer, gpointer user_data)
+{
+   const GList *tracks;
+
+   tracks = gst_mixer_list_tracks (mixer);
+
+   while (tracks != NULL) {
+      GstMixerTrack *track = GST_MIXER_TRACK (tracks->data);
+
+      if (GST_MIXER_HAS_FLAG (track, GST_MIXER_TRACK_MASTER)) {
+         AcmeVolumeGStreamer *self;
+
+         self = ACME_VOLUME_GSTREAMER (user_data);
+
+         self->_priv->mixer = mixer;
+         self->_priv->track = track;
+
+         /* no need to ref the mixer element */
+         g_object_ref (self->_priv->track);
+         return TRUE;
+      }
+
+      tracks = tracks->next;
+   }
+
+   return FALSE;
+}
+#endif
+
 /* This is a modified version of code from gnome-media's gst-mixer */
 static gboolean
 acme_volume_gstreamer_open (AcmeVolumeGStreamer *vol)
@@ -237,9 +280,24 @@
 	 * for first one named "volume".
 	 * 
 	 * We should probably do something intelligent if we don't find an
-	 * appropriate mixer/track.  But now we do something stupid... everything
-	 * just becomes a no-op.
+	 * appropriate mixer/track.  But now we do something stupid...
+	 * everything just becomes a no-op.
 	 */
+#ifdef HAVE_GST10
+   GList *mixer_list;
+
+   mixer_list = gst_audio_default_registery_mixer_filter (_acme_set_mixer,
+                                                          TRUE,
+                                                          self);
+
+   if (mixer_list == NULL)
+      return FALSE;
+
+   /* do not unref the mixer as we keep the ref for self->priv->mixer */
+   g_list_free (mixer_list);
+
+   return TRUE;
+#else
 	elements = gst_registry_pool_feature_list (GST_TYPE_ELEMENT_FACTORY);
 	for ( ; elements != NULL && self->_priv->mixer == NULL; elements = elements->next) {
 		GstElementFactory *factory = GST_ELEMENT_FACTORY (elements->data);
@@ -321,6 +379,7 @@
 		g_free (title);
 	}
 	return FALSE;
+#endif
 }
 
 static void
--- gnome-settings-daemon/actions/Makefile.am	2005-08-03 12:45:13.000000000 -0500
+++ gnome-settings-daemon/actions/Makefile.am	2006-01-06 13:53:09.000000000 -0600
@@ -6,9 +6,12 @@
 	acme-volume.c acme-volume.h \
 	acme-volume-dummy.c acme-volume-dummy.h
 
-libacme_la_LIBADD = 
+libacme_la_LIBADD = $(GST_LIBS)
 
 if HAVE_GSTREAMER
+if HAVE_GST10
+INCLUDES += -DHAVE_GST10
+endif
 INCLUDES += -DHAVE_GSTREAMER
 libacme_la_SOURCES += acme-volume-gstreamer.c acme-volume-gstreamer.h
 libacme_la_LIBADD += $(GST_LIBS)
--- configure.in	2006-01-03 13:08:33.000000000 -0600
+++ configure.in	2006-01-06 17:00:06.000000000 -0600
@@ -462,25 +462,46 @@
 dnl ==============================================
 dnl GStreamer section
 dnl ==============================================
+GST_MAJORMINOR=auto
+
 AC_ARG_ENABLE(gstreamer,
-AC_HELP_STRING([--enable-gstreamer],[use gstreamer, if available]),
+AC_HELP_STRING([--enable-gstreamer],[use gstreamer, if available (and optionally specify a version)]),
 [case "${enableval}" in
  yes) ENABLE_GSTREAMER=yes ;;
+ 0.8) ENABLE_GSTREAMER=yes && GST_MAJORMINOR=0.8 ;;
+ 0.10) ENABLE_GSTREAMER=yes && GST_MAJORMINOR=0.10 ;;
  no)  ENABLE_GSTREAMER=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-gstreamer) ;;
+ *) AC_MSG_ERROR([
+                  *** Bad value ${enableval} for --enable-gstreamer
+                  *** Please use one of the following:
+                  ***    --enable-gstreamer=0.8
+                  ***    --enable-gstreamer=0.10
+               ]) ;;
 esac],
 [ENABLE_GSTREAMER=yes]) dnl Default value
 
 if test "x$ENABLE_GSTREAMER" = "xyes"; then
    have_gstreamer=no
-   PKG_CHECK_MODULES(GST, gstreamer-interfaces-0.8 >= 0.8.0,
-		   have_gstreamer=yes,
-		   AC_MSG_RESULT(*** All of GStreamer dependent parts will be disabled ***))
+   if test x$GST_MAJORMINOR = xauto ; then
+      PKG_CHECK_MODULES(GST, gstreamer-0.8,[GST_MAJORMINOR=0.8],[GST_MAJORMINOR=0.10])
+   fi
+
+   if test x$GST_MAJORMINOR = x0.8 ; then
+      GST_REQS=0.8.0
+      PKGS="gstreamer-0.8 >= $GST_REQS gstreamer-interfaces-0.8 >= $GST_REQS"
+   else
+      GST_REQS=0.10.1
+      PKGS="gstreamer-0.10 >= $GST_REQS gstreamer-plugins-base-0.10 >= $GST_REQS"
+   fi
+
+   PKG_CHECK_MODULES(GST, $PKGS, have_gstreamer=yes,
+                     AC_MSG_RESULT([*** All of GStreamer dependent parts will be disabled ***]))
 else
    have_gstreamer=disabled
    AC_MSG_RESULT(*** GStreamer has been explicitly disabled ***)
 fi
 AM_CONDITIONAL(HAVE_GSTREAMER, test x"$have_gstreamer" = "xyes")
+AM_CONDITIONAL(HAVE_GST10, test x"$GST_MAJORMINOR" = "x0.10")
 AC_SUBST(GST_LIBS)
 AC_SUBST(GST_CFLAGS)
 
