Re: [Rhythmbox-devel] Rhythmbox vs. GStreamer HEAD



> but gst-launch-0.7 gives the same complaint and can play my files.
> (There was a problem with the 'volume dparam' that I fixed by changing
> G_TYPE_FLOAT to G_TYPE_DOUBLE at rb-player-gst.c:515). Any idea what's
> going on? Should I be sticking to gst 0.7.4?

rb-player-gst needs a bit more changes to work with this float->double
volume change, the attached patch works for me. I didn't commit it since
it would break for people using arch with gstreamer 0.7.4.

Hope that helps,

Christophe

* looking for rhythmbox-devel@gnome.org--2004/rhythmbox--main--0.7--patch-91 to compare with
* comparing to rhythmbox-devel@gnome.org--2004/rhythmbox--main--0.7--patch-91
M  player/rb-player-gst.c

* modified files

--- orig/player/rb-player-gst.c
+++ mod/player/rb-player-gst.c
@@ -512,7 +512,7 @@
 	gst_bin_add (GST_BIN (mp->priv->waiting_bin), mp->priv->volume);
 	dpman = gst_dpman_get_manager (mp->priv->volume);
 	gst_dpman_set_mode (dpman, "synchronous");
-	mp->priv->volume_dparam = gst_dpsmooth_new (G_TYPE_FLOAT);
+	mp->priv->volume_dparam = gst_dpsmooth_new (G_TYPE_DOUBLE);
 	g_assert (mp->priv->volume_dparam != NULL);
 	gst_dpman_attach_dparam (dpman, "volume", mp->priv->volume_dparam);
 
@@ -546,7 +546,7 @@
 	if (mp->priv->cur_volume < 0.0)
 		mp->priv->cur_volume = 0;
 	g_object_set (G_OBJECT (mp->priv->volume_dparam),
-		      "value_float", mp->priv->cur_volume,
+		      "value_double", mp->priv->cur_volume,
 		      NULL);
 	g_object_set (G_OBJECT (mp->priv->volume),
 		      "mute", mp->priv->mute,
@@ -849,7 +849,7 @@
 
 	if (mp->priv->pipeline != NULL) {
 		g_object_set (G_OBJECT (mp->priv->volume_dparam),
-			      "value_float",
+			      "value_double",
 			      mp->priv->cur_volume * scale,
 			      NULL);
 	}
@@ -857,14 +857,14 @@
 
 void
 rb_player_set_volume (RBPlayer *mp,
-				float volume)
+		      float volume)
 {
 	g_return_if_fail (RB_IS_PLAYER (mp));
 	g_return_if_fail (volume >= 0.0 && volume <= 1.0);
 
 	if (mp->priv->pipeline != NULL) {
 		g_object_set (G_OBJECT (mp->priv->volume_dparam),
-			      "value_float",
+			      "value_double",
 			      volume,
 			      NULL);
 	}



Ceci est une partie de message=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e=2E?=



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]