? m4/intltool.m4
Index: configure.in
===================================================================
RCS file: /cvs/gnome/gnome-control-center/configure.in,v
retrieving revision 1.526
diff -u -p -r1.526 configure.in
--- configure.in	3 Jan 2006 19:23:03 -0000	1.526
+++ configure.in	9 Jan 2006 09:33:58 -0000
@@ -473,9 +473,13 @@ esac],
 
 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 ***))
+   # Requires 0.10.2 or CVS before 0.10.2
+   PKG_CHECK_MODULES(GST, gstreamer-plugins-base-0.10 >= 0.10.1.1,
+		   [ have_gstreamer=yes
+                     GST_LIBS="$GST_LIBS -lgstinterfaces-0.10 -lgstaudio-0.10"
+                   ], [
+		     AC_MSG_RESULT(*** All GStreamer dependent parts will be disabled ***)
+                   ])
 else
    have_gstreamer=disabled
    AC_MSG_RESULT(*** GStreamer has been explicitly disabled ***)
Index: gnome-settings-daemon/actions/acme-volume-gstreamer.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/actions/acme-volume-gstreamer.c,v
retrieving revision 1.8
diff -u -p -r1.8 acme-volume-gstreamer.c
--- gnome-settings-daemon/actions/acme-volume-gstreamer.c	12 Jun 2005 11:43:01 -0000	1.8
+++ gnome-settings-daemon/actions/acme-volume-gstreamer.c	9 Jan 2006 09:34:00 -0000
@@ -28,8 +28,7 @@
 #include "acme-volume-gstreamer.h"
 
 #include <gst/gst.h>
-#include <gst/mixer/mixer.h>
-#include <gst/propertyprobe/propertyprobe.h>
+#include <gst/audio/mixerutils.h>
 
 #include <string.h>
 
@@ -214,14 +213,41 @@ acme_volume_gstreamer_close_real (AcmeVo
 	return FALSE;
 }
 
-/* This is a modified version of code from gnome-media's gst-mixer */
 static gboolean
-acme_volume_gstreamer_open (AcmeVolumeGStreamer *vol)
+mixer_filter_func (GstMixer * mixer, gpointer user_data)
 {
-  	AcmeVolumeGStreamer *self = (AcmeVolumeGStreamer *) vol;
-  	const GList *elements;
-  	gint num = 0;
-  
+	const GList *tracks;
+
+	tracks = gst_mixer_list_tracks (mixer);
+
+	while (tracks != NULL) {
+		GstMixerTrack *track = GST_MIXER_TRACK (tracks->data);
+				
+		if (GST_MIXER_TRACK_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; /* don't want this one */
+}
+
+static gboolean
+acme_volume_gstreamer_open (AcmeVolumeGStreamer *self)
+{
+	gboolean ret = FALSE;
+	GList *mixer_list;
+
 	if (self->_priv == NULL)
 		return FALSE;
 	
@@ -231,96 +257,27 @@ acme_volume_gstreamer_open (AcmeVolumeGS
 		self->_priv->timer_id = 0;
 		return TRUE;
 	}
-		
+
 	/* Go through all elements of a certain class and check whether
 	 * they implement a mixer. If so, walk through the tracks and look
 	 * 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.
 	 */
-	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);
-		gchar *title = NULL;
-		const gchar *klass;
-		GstElement *element = NULL;
-		const GParamSpec *devspec;
-		GstPropertyProbe *probe;
-		GValueArray *array = NULL;
-		gint n;
-		const GList *tracks;
-		
-		/* check category */
-		klass = gst_element_factory_get_klass (factory);
-		if (strcmp (klass, "Generic/Audio"))
-			goto next;
-		
-		/* create element */
-		title = g_strdup_printf ("gst-mixer-%d", num);
-		element = gst_element_factory_create (factory, title);
-		if (!element)
-			goto next;
-		
-		if (!GST_IS_PROPERTY_PROBE (element))
-			goto next;
-		
-		probe = GST_PROPERTY_PROBE (element);
-		devspec = gst_property_probe_get_property (probe, "device");
-		if (devspec == NULL)
-			goto next;
-		array = gst_property_probe_probe_and_get_values (probe, devspec);
-		if (array == NULL)
-			goto next;
-
-		/* set all devices and test for mixer */
-		for (n = 0; n < array->n_values; n++) {
-			GValue *device = g_value_array_get_nth (array, n);
-			
-			/* set this device */
-			g_object_set_property (G_OBJECT (element), "device", device);
-			if (gst_element_set_state (element,
-						   GST_STATE_READY) == GST_STATE_FAILURE)
-				continue;
-			
-			/* Is this device a mixer?  If so, add it to the list. */
-			if (!GST_IS_MIXER (element)) {
-				gst_element_set_state (element, GST_STATE_NULL);
-				continue;
-			}
-			
-			tracks = gst_mixer_list_tracks (GST_MIXER (element));
-			for (; tracks != NULL; tracks = tracks->next) {
-				GstMixerTrack *track = tracks->data;
-				
-				if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_MASTER)) {
-					self->_priv->mixer = GST_MIXER (element);
-					self->_priv->track = track;
-
-					g_object_ref (self->_priv->mixer);
-					g_object_ref (self->_priv->track);
-					if (array)
-						g_value_array_free (array);
-					return TRUE;
-				}
-			}
-			
-			num++;
-			
-			/* and recreate this object, since we give it to the mixer */
-			title = g_strdup_printf ("gst-mixer-%d", num);
-			element = gst_element_factory_create (factory, title);
-		}
-		
-	next:
-		if (element)
-			gst_object_unref (GST_OBJECT (element));
-		if (array)
-			g_value_array_free (array);
-		g_free (title);
-	}
-	return FALSE;
+
+	mixer_list = gst_audio_default_registry_mixer_filter (mixer_filter_func,
+	                                                      TRUE,
+	                                                      self);
+
+	ret = (mixer_list != NULL);
+
+	/* do not unref mixer in list, we're keeping
+	 * the ref for self->priv->mixer */
+	g_list_free (mixer_list);
+
+	return ret;
 }
 
 static void
