rpms/rhythmbox/F-12 0001-Use-Cubic-volume-when-StreaVolume-interface-is-avail.patch, NONE, 1.1 rhythmbox.spec, 1.270, 1.271

Bastien Nocera hadess at fedoraproject.org
Mon Oct 19 17:04:07 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/rhythmbox/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6125

Modified Files:
	rhythmbox.spec 
Added Files:
	0001-Use-Cubic-volume-when-StreaVolume-interface-is-avail.patch 
Log Message:
* Mon Oct 19 2009 Bastien Nocera <bnocera at redhat.com> 0.12.5-7
- Use bicubic volumes in the UI
- Avoid using HEAD to get podcast mime-types


0001-Use-Cubic-volume-when-StreaVolume-interface-is-avail.patch:
 backends/gstreamer/rb-player-gst-xfade.c |   24 ++++++++++++++++++++++--
 backends/gstreamer/rb-player-gst.c       |   18 ++++++++++++++++--
 configure.ac                             |    5 ++---
 3 files changed, 40 insertions(+), 7 deletions(-)

--- NEW FILE 0001-Use-Cubic-volume-when-StreaVolume-interface-is-avail.patch ---
>From 86dd077ddc6cbb6984382f8dde94079b5f6c9e9a Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess at hadess.net>
Date: Mon, 19 Oct 2009 16:16:32 +0100
Subject: [PATCH] Use Cubic volume when StreaVolume interface is available

Fixes Rhythmbox's sound not matching the volume levels advertised
in pavucontrol and gnome-volume-control.

https://bugzilla.gnome.org/show_bug.cgi?id=598955
---
 backends/gstreamer/rb-player-gst-xfade.c |   24 ++++++++++++++++++++++--
 backends/gstreamer/rb-player-gst.c       |   18 ++++++++++++++++--
 configure.ac                             |    4 ++--
 3 files changed, 40 insertions(+), 6 deletions(-)

diff --git a/backends/gstreamer/rb-player-gst-xfade.c b/backends/gstreamer/rb-player-gst-xfade.c
index 101ba0c..f96634d 100644
--- a/backends/gstreamer/rb-player-gst-xfade.c
+++ b/backends/gstreamer/rb-player-gst-xfade.c
@@ -158,6 +158,7 @@
 #include <gst/gst.h>
 #include <gst/controller/gstcontroller.h>
 #include <gst/base/gstbasetransform.h>
+#include <gst/interfaces/streamvolume.h>
 #include <gst/pbutils/pbutils.h>
 
 #include "rb-player.h"
@@ -2622,7 +2623,16 @@ tick_timeout (RBPlayerGstXFade *player)
 static gboolean
 emit_volume_changed_idle (RBPlayerGstXFade *player)
 {
-	_rb_player_emit_volume_changed (RB_PLAYER (player), player->priv->cur_volume);
+	double vol;
+
+	if (gst_element_implements_interface (player->priv->volume_handler, GST_TYPE_STREAM_VOLUME)) {
+		vol = gst_stream_volume_get_volume (GST_STREAM_VOLUME (player->priv->volume_handler),
+						    GST_STREAM_VOLUME_FORMAT_CUBIC);
+	} else {
+		vol = player->priv->cur_volume;
+	}
+
+	_rb_player_emit_volume_changed (RB_PLAYER (player), vol);
 	return FALSE;
 }
 
@@ -3700,7 +3710,13 @@ rb_player_gst_xfade_set_volume (RBPlayer *iplayer, float volume)
 		gdouble v = (gdouble)volume;
 
 		/* maybe use a controller here for smoother changes? */
-		g_object_set (player->priv->volume_handler, "volume", v, NULL);
+		if (gst_element_implements_interface (player->priv->volume_handler,
+						      GST_TYPE_STREAM_VOLUME)) {
+			gst_stream_volume_set_volume (GST_STREAM_VOLUME (player->priv->volume_handler),
+						      GST_STREAM_VOLUME_FORMAT_CUBIC, v);
+		} else {
+			g_object_set (player->priv->volume_handler, "volume", v, NULL);
+		}
 		player->priv->volume_applied = player->priv->volume_changed;
 	}
 	player->priv->cur_volume = volume;
@@ -3712,6 +3728,10 @@ rb_player_gst_xfade_get_volume (RBPlayer *iplayer)
 {
 	RBPlayerGstXFade *player = RB_PLAYER_GST_XFADE (iplayer);
 
+	if (gst_element_implements_interface (player->priv->volume_handler, GST_TYPE_STREAM_VOLUME))
+		return gst_stream_volume_get_volume (GST_STREAM_VOLUME (player->priv->volume_handler),
+						     GST_STREAM_VOLUME_FORMAT_CUBIC);
+
 	return player->priv->cur_volume;
 }
 
diff --git a/backends/gstreamer/rb-player-gst.c b/backends/gstreamer/rb-player-gst.c
index 21246a1..f02712e 100644
--- a/backends/gstreamer/rb-player-gst.c
+++ b/backends/gstreamer/rb-player-gst.c
@@ -36,6 +36,7 @@
 #include <glib/gi18n.h>
 #include <gdk/gdk.h>
 #include <gst/tag/tag.h>
+#include <gst/interfaces/streamvolume.h>
 #include <gst/pbutils/pbutils.h>
 
 #include "rb-debug.h"
@@ -155,7 +156,16 @@ about_to_finish_cb (GstElement *playbin, RBPlayerGst *player)
 static gboolean
 emit_volume_changed_idle (RBPlayerGst *player)
 {
-	_rb_player_emit_volume_changed (RB_PLAYER (player), player->priv->cur_volume);
+	double vol;
+
+	if (gst_element_implements_interface (player->priv->playbin, GST_TYPE_STREAM_VOLUME)) {
+		vol = gst_stream_volume_get_volume (GST_STREAM_VOLUME (player->priv->playbin),
+						    GST_STREAM_VOLUME_FORMAT_CUBIC);
+	} else {
+		vol = player->priv->cur_volume;
+	}
+
+	_rb_player_emit_volume_changed (RB_PLAYER (player), vol);
 	return FALSE;
 }
 
@@ -720,7 +730,11 @@ set_playbin_volume (RBPlayerGst *player, float volume)
 	 * we still get another one anyway.
 	 */
 	g_signal_handlers_block_by_func (player->priv->playbin, volume_notify_cb, player);
-	g_object_set (player->priv->playbin, "volume", volume, NULL);
+	if (gst_element_implements_interface (player->priv->playbin, GST_TYPE_STREAM_VOLUME))
+		gst_stream_volume_set_volume (GST_STREAM_VOLUME (player->priv->playbin),
+					      GST_STREAM_VOLUME_FORMAT_CUBIC, volume);
+	else
+		g_object_set (player->priv->playbin, "volume", volume, NULL);
 	g_signal_handlers_unblock_by_func (player->priv->playbin, volume_notify_cb, player);
 }
 
diff --git a/configure.ac b/configure.ac
index db6ed1f..1f45d41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@ AC_C_BIGENDIAN
 AC_CHECK_SIZEOF(long)
 
 DBUS_MIN_REQS=0.35
-GST_0_10_REQS=0.10.20
+GST_0_10_REQS=0.10.25
 GTK_REQS=2.12.0
 GLIB_REQS=2.16.0
 GNOME_MEDIA_PROFILES_REQS=2.8
@@ -247,7 +247,7 @@ PKG_CHECK_MODULES(GSTREAMER_0_10, \
 	gstreamer-plugins-base-0.10 >= $GST_0_10_REQS)
 
 RHYTHMBOX_CFLAGS="$RHYTHMBOX_CFLAGS $GSTREAMER_0_10_CFLAGS"
-RHYTHMBOX_LIBS="$RHYTHMBOX_LIBS $GSTREAMER_0_10_LIBS"
+RHYTHMBOX_LIBS="$RHYTHMBOX_LIBS $GSTREAMER_0_10_LIBS -lgstinterfaces-0.10"
 
 dnl DAAP (iTunes Music Shares)
 AC_ARG_ENABLE(daap,
-- 
1.6.5.rc2



Index: rhythmbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/F-12/rhythmbox.spec,v
retrieving revision 1.270
retrieving revision 1.271
diff -u -p -r1.270 -r1.271
--- rhythmbox.spec	13 Oct 2009 16:21:00 -0000	1.270
+++ rhythmbox.spec	19 Oct 2009 17:04:07 -0000	1.271
@@ -3,7 +3,7 @@
 Name: rhythmbox
 Summary: Music Management Application
 Version: 0.12.5
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: GPLv2+ with exceptions and GFDL
 Group: Applications/Multimedia
 URL: http://projects.gnome.org/rhythmbox/
@@ -55,6 +55,11 @@ BuildRequires: automake autoconf libtool
 Patch1: 0001-Use-C-only-for-the-browser-plugin.patch
 # https://bugzilla.gnome.org/show_bug.cgi?id=597899
 Patch2: rb-fix-daap-plugin.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=596615
+Patch3: rb-no-HEAD-for-podcasts.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=598955
+Patch4: 0001-Use-Cubic-volume-when-StreaVolume-interface-is-avail.patch
+
 
 %description
 Rhythmbox is an integrated music management application based on the powerful
@@ -92,6 +97,8 @@ from, and sending media to UPnP/DLNA net
 %patch1 -p1 -b .itms
 %patch2 -p1 -b .daap
 autoreconf -i
+%patch3 -p1 -b .http-head
+%patch4 -p1 -b .bicubic
 
 # 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/' '{}' ';'
@@ -222,6 +229,10 @@ fi
 %{_libdir}/rhythmbox/plugins/upnp_coherence
 
 %changelog
+* Mon Oct 19 2009 Bastien Nocera <bnocera at redhat.com> 0.12.5-7
+- Use bicubic volumes in the UI
+- Avoid using HEAD to get podcast mime-types
+
 * Tue Oct 13 2009 Bastien Nocera <bnocera at redhat.com> 0.12.5-6
 - Fix DAAP plugin linkage
 




More information about the fedora-extras-commits mailing list