rpms/rhythmbox/devel rb-mb3-crash.patch, NONE, 1.1 rb-use-pulsesink-volume.patch, NONE, 1.1 rhythmbox.spec, 1.224, 1.225

Bastien Nocera hadess at fedoraproject.org
Fri Feb 13 11:30:58 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/rhythmbox/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28596

Modified Files:
	rhythmbox.spec 
Added Files:
	rb-mb3-crash.patch rb-use-pulsesink-volume.patch 
Log Message:
* Fri Feb 13 2009 - Bastien Nocera <bnocera at redhat.com> - 0.11.6-24.r6096
- Use the pulsesink's volume instead of our own one
- Fix crasher when musicbrainz3 doesn't get a match for an audio CD (#481441)


rb-mb3-crash.patch:

--- NEW FILE rb-mb3-crash.patch ---
Index: libjuicer/sj-metadata-musicbrainz3.c
===================================================================
--- libjuicer/sj-metadata-musicbrainz3.c	(revision 2379)
+++ libjuicer/sj-metadata-musicbrainz3.c	(working copy)
@@ -247,6 +247,11 @@
   mb_release_filter_free (filter);
   g_free (id);
 
+  if (results == NULL) {
+    mb_query_free (query);
+    return NULL;
+  }
+
   if (mb_result_list_get_size (results) == 0) {
     mb_result_list_free (results);
     mb_query_free (query);

rb-use-pulsesink-volume.patch:

--- NEW FILE rb-use-pulsesink-volume.patch ---
Index: backends/gstreamer/rb-player-gst.c
===================================================================
--- backends/gstreamer/rb-player-gst.c	(revision 6149)
+++ backends/gstreamer/rb-player-gst.c	(working copy)
@@ -112,6 +112,7 @@
 	GDestroyNotify stream_data_destroy;
 
 	GstElement *playbin;
+	GstElement *audio_sink;
 
 	gboolean can_signal_direct_error;
 	GError *error;
@@ -262,6 +263,10 @@
 
 		rb_player_gst_gst_free_playbin (mp);
 	}
+	if (mp->priv->audio_sink) {
+		g_object_unref (mp->priv->audio_sink);
+		mp->priv->audio_sink = NULL;
+	}
 
 	if (mp->priv->waiting_tees) {
 		g_list_foreach (mp->priv->waiting_tees, (GFunc)gst_object_sink, NULL);
@@ -596,22 +601,27 @@
 	/* let plugins add bits to playbin */
 	g_object_notify (G_OBJECT (mp), "playbin");
 
-	/* Use gconfaudiosink for audio if there's no audio sink yet */
+	/* Use pulsesink then gconfaudiosink for audio if there's no audio sink yet */
 	g_object_get (G_OBJECT (mp->priv->playbin), "audio-sink", &sink, NULL);
 	if (sink == NULL) {
-		sink = gst_element_factory_make ("gconfaudiosink", "audiosink");
+		sink = gst_element_factory_make ("pulsesink", "audiosink");
 		if (sink == NULL) {
-			/* fall back to autoaudiosink */
-			sink = gst_element_factory_make ("autoaudiosink", "audiosink");
+			sink = gst_element_factory_make ("gconfaudiosink", "audiosink");
+			if (sink == NULL) {
+				/* fall back to autoaudiosink */
+				sink = gst_element_factory_make ("autoaudiosink", "audiosink");
+			}
+
+			if (sink != NULL) {
+				/* set the profile property on the gconfaudiosink to "music and movies" */
+				if (g_object_class_find_property (G_OBJECT_GET_CLASS (sink), "profile"))
+					g_object_set (G_OBJECT (sink), "profile", 1, NULL);
+			}
+		} else if (g_object_class_find_property (G_OBJECT_GET_CLASS (sink), "volume")) {
+			mp->priv->audio_sink = g_object_ref (sink);
 		}
-
-		if (sink != NULL) {
-			/* set the profile property on the gconfaudiosink to "music and movies" */
-			if (g_object_class_find_property (G_OBJECT_GET_CLASS (sink), "profile"))
-				g_object_set (G_OBJECT (sink), "profile", 1, NULL);
-
+		if (sink != NULL)
 			g_object_set (G_OBJECT (mp->priv->playbin), "audio-sink", sink, NULL);
-		}
 	} else {
 		g_object_unref (sink);
 	}
@@ -1041,15 +1051,24 @@
 		GParamSpec *volume_pspec;
 		GValue val = {0,};
 
-		volume_pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (mp->priv->playbin),
-							     "volume");
+		if (mp->priv->audio_sink != NULL) {
+			volume_pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (mp->priv->audio_sink),
+								     "volume");
+		} else {
+			volume_pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (mp->priv->playbin),
+								     "volume");
+		}
 		g_value_init (&val, G_TYPE_DOUBLE);
 
 		g_value_set_double (&val, mp->priv->cur_volume * scale);
 		if (g_param_value_validate (volume_pspec, &val))
 			rb_debug ("replay gain too high, reducing value to %f", g_value_get_double (&val));
 
-		g_object_set_property (G_OBJECT (mp->priv->playbin), "volume", &val);
+		if (mp->priv->audio_sink != NULL) {
+			g_object_set_property (G_OBJECT (mp->priv->audio_sink), "volume", &val);
+		} else {
+			g_object_set_property (G_OBJECT (mp->priv->playbin), "volume", &val);
+		}
 		g_value_unset (&val);
 	}
 }
@@ -1061,7 +1080,12 @@
 	RBPlayerGst *mp = RB_PLAYER_GST (player);
 	g_return_if_fail (volume >= 0.0 && volume <= 1.0);
 
-	if (mp->priv->playbin != NULL) {
+	if (mp->priv->audio_sink != NULL) {
+		g_object_set (G_OBJECT (mp->priv->audio_sink),
+			      "volume",
+			      volume,
+			      NULL);
+	} else if (mp->priv->playbin != NULL) {
 		g_object_set (G_OBJECT (mp->priv->playbin),
 			      "volume",
 			      volume,
Index: backends/gstreamer/rb-player-gst-xfade.c
===================================================================
--- backends/gstreamer/rb-player-gst-xfade.c	(revision 6149)
+++ backends/gstreamer/rb-player-gst-xfade.c	(working copy)
@@ -377,6 +377,7 @@
 	gboolean playing;
 
 	float cur_volume;
+	gboolean has_volume_prop;
 	guint buffer_size;	/* kB */
 
 	guint tick_timeout_id;
@@ -3007,22 +3008,27 @@
 		return FALSE;
 	}
 
-	g_object_set (player->priv->volume, "volume", player->priv->cur_volume, NULL);
-
-	player->priv->sink = gst_element_factory_make ("gconfaudiosink", NULL);
+	player->priv->sink = gst_element_factory_make ("pulsesink", NULL);
 	if (player->priv->sink == NULL) {
-		player->priv->sink = gst_element_factory_make ("autoaudiosink", NULL);
+		player->priv->sink = gst_element_factory_make ("gconfaudiosink", NULL);
 		if (player->priv->sink == NULL) {
-			g_set_error (error,
-				     RB_PLAYER_ERROR,
-				     RB_PLAYER_ERROR_GENERAL,
-				     _("Failed to create audio output element; check your installation"));
-			return FALSE;
+			player->priv->sink = gst_element_factory_make ("autoaudiosink", NULL);
+			if (player->priv->sink == NULL) {
+				g_set_error (error,
+					     RB_PLAYER_ERROR,
+					     RB_PLAYER_ERROR_GENERAL,
+					     _("Failed to create audio output element; check your installation"));
+				return FALSE;
+			}
+		} else {
+			/* set the profile property on the gconfaudiosink to "music and movies" */
+			if (g_object_class_find_property (G_OBJECT_GET_CLASS (player->priv->sink), "profile"))
+				g_object_set (player->priv->sink, "profile", 1, NULL);
 		}
-	} else {
-		/* set the profile property on the gconfaudiosink to "music and movies" */
-		if (g_object_class_find_property (G_OBJECT_GET_CLASS (player->priv->sink), "profile"))
-			g_object_set (player->priv->sink, "profile", 1, NULL);
+		g_object_set (player->priv->volume, "volume", player->priv->cur_volume, NULL);
+	} else if (g_object_class_find_property (G_OBJECT_GET_CLASS (player->priv->sink), "volume")) {
+		player->priv->has_volume_prop = TRUE;
+		g_object_set (player->priv->volume, "volume", 1.0f, NULL);
 	}
 
 	g_object_set (player->priv->capsfilter, "caps", caps, NULL);
@@ -3665,10 +3671,11 @@
 rb_player_gst_xfade_set_volume (RBPlayer *iplayer, float volume)
 {
 	RBPlayerGstXFade *player = RB_PLAYER_GST_XFADE (iplayer);
+	gdouble v = (gdouble)volume;
 
-	if (player->priv->volume != NULL) {
-		gdouble v = (gdouble)volume;
-
+	if (player->priv->has_volume_prop) {
+		g_object_set (player->priv->sink, "volume", v, NULL);
+	} else if (player->priv->volume != NULL) {
 		/* maybe use a controller here for smoother changes? */
 		g_object_set (player->priv->volume, "volume", v, NULL);
 	}


Index: rhythmbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/devel/rhythmbox.spec,v
retrieving revision 1.224
retrieving revision 1.225
diff -u -r1.224 -r1.225
--- rhythmbox.spec	20 Jan 2009 13:30:49 -0000	1.224
+++ rhythmbox.spec	13 Feb 2009 11:30:27 -0000	1.225
@@ -3,7 +3,7 @@
 Name: rhythmbox
 Summary: Music Management Application 
 Version: 0.11.6
-Release: 23.r6096%{?dist}
+Release: 24.r6096%{?dist}
 License: GPLv2+ with exceptions and GFDL
 Group: Applications/Multimedia
 URL: http://projects.gnome.org/rhythmbox/
@@ -57,6 +57,12 @@
 # http://bugzilla.gnome.org/show_bug.cgi?id=562188
 Patch1: rb-avahi-assertion.patch
 
+# http://bugzilla.gnome.org/show_bug.cgi?id=571606
+Patch2: rb-use-pulsesink-volume.patch
+
+# http://bugzilla.gnome.org/show_bug.cgi?id=565056
+Patch3: rb-mb3-crash.patch
+
 %description
 Rhythmbox is an integrated music management application based on the powerful
 GStreamer media framework. It has a number of features, including an easy to
@@ -91,6 +97,10 @@
 
 %patch0 -p0 -b .dont-disable-suspend
 %patch1 -p1 -b .avahi-assertion
+%patch2 -p0 -b .pulsesink-volume
+pushd plugins/audiocd/
+%patch3 -p1 -b .mb3-crash
+popd
 
 # Use the installed louie, not the one in Coherence
 find plugins/coherence/upnp_coherence/ -type f -exec sed -i 's/coherence.extern.louie as louie/louie/' '{}' ';'
@@ -227,6 +237,10 @@
 %{_libdir}/rhythmbox/plugins/upnp_coherence
 
 %changelog
+* Fri Feb 13 2009 - Bastien Nocera <bnocera at redhat.com> - 0.11.6-24.r6096
+- Use the pulsesink's volume instead of our own one
+- Fix crasher when musicbrainz3 doesn't get a match for an audio CD (#481441)
+
 * Tue Jan 20 2009 - Bastien Nocera <bnocera at redhat.com> - 0.11.6-23.r6096
 - Fix UPNP plugin for use with external Louie (#480036)
 




More information about the fedora-extras-commits mailing list