rpms/totem/devel totem-use-pulsesink-volume.patch, 1.3, 1.4 totem.spec, 1.233, 1.234
Bastien Nocera
hadess at fedoraproject.org
Thu Apr 2 16:54:28 UTC 2009
Author: hadess
Update of /cvs/pkgs/rpms/totem/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27615
Modified Files:
totem-use-pulsesink-volume.patch totem.spec
Log Message:
* Thu Apr 02 2009 - Bastien Nocera <bnocera at redhat.com> - 2.26.1-2
- Update patch to set the PA stream volume, avoids setting the
volume when pulsesink isn't in a state where it has a stream
(#488532)
totem-use-pulsesink-volume.patch:
Index: totem-use-pulsesink-volume.patch
===================================================================
RCS file: /cvs/pkgs/rpms/totem/devel/totem-use-pulsesink-volume.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- totem-use-pulsesink-volume.patch 17 Feb 2009 14:57:49 -0000 1.3
+++ totem-use-pulsesink-volume.patch 2 Apr 2009 16:53:57 -0000 1.4
@@ -1,18 +1,19 @@
Index: src/backend/bacon-video-widget-gst-0.10.c
===================================================================
---- src/backend/bacon-video-widget-gst-0.10.c (revision 5970)
+--- src/backend/bacon-video-widget-gst-0.10.c (revision 6227)
+++ src/backend/bacon-video-widget-gst-0.10.c (working copy)
-@@ -166,7 +166,8 @@
+@@ -163,7 +163,9 @@
gboolean cursor_shown;
gboolean fullscreen_mode;
gboolean auto_resize;
- gboolean uses_fakesink;
+ gboolean uses_audio_fakesink;
+ GstElement *pulse_audio_sink;
++ gdouble volume;
gint video_width; /* Movie width */
gint video_height; /* Movie height */
-@@ -1892,6 +1893,11 @@
+@@ -1879,6 +1881,11 @@
g_free (bvw->priv->vis_element_name);
bvw->priv->vis_element_name = NULL;
@@ -24,7 +25,16 @@
if (bvw->priv->vis_plugins_list) {
g_list_free (bvw->priv->vis_plugins_list);
bvw->priv->vis_plugins_list = NULL;
-@@ -3145,7 +3151,7 @@
+@@ -1986,7 +1993,7 @@
+ bacon_video_widget_get_show_cursor (bvw));
+ break;
+ case PROP_VOLUME:
+- g_value_set_double (value, bacon_video_widget_get_volume (bvw));
++ g_value_set_double (value, bvw->priv->volume);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+@@ -3133,7 +3140,7 @@
if (bvw->priv->speakersetup == BVW_AUDIO_SOUND_AC3PASSTHRU)
return FALSE;
@@ -33,43 +43,59 @@
}
void
-@@ -3157,8 +3163,13 @@
+@@ -3145,8 +3152,25 @@
if (bacon_video_widget_can_set_volume (bvw) != FALSE)
{
volume = CLAMP (volume, 0.0, 1.0);
- g_object_set (bvw->priv->play, "volume",
- (gdouble) volume, NULL);
+ if (bvw->priv->pulse_audio_sink) {
-+ g_object_set (bvw->priv->pulse_audio_sink, "volume",
-+ (gdouble) volume, NULL);
++ GstState cur_state;
++
++ gst_element_get_state (bvw->priv->pulse_audio_sink, &cur_state, NULL, 0);
++ if (cur_state == GST_STATE_READY || cur_state == GST_STATE_PLAYING)
++ {
++ gdouble new_vol;
++ g_object_set (bvw->priv->pulse_audio_sink, "volume",
++ (gdouble) volume, NULL);
++ got_set = TRUE;
++
++ g_object_get (bvw->priv->pulse_audio_sink, "volume", &new_vol, NULL);
++ }
+ } else {
+ g_object_set (bvw->priv->play, "volume",
+ (gdouble) volume, NULL);
+ }
++
++ bvw->priv->volume = volume;
g_object_notify (G_OBJECT (bvw), "volume");
}
}
-@@ -3171,7 +3182,11 @@
+@@ -3159,9 +3183,7 @@
g_return_val_if_fail (BACON_IS_VIDEO_WIDGET (bvw), 0.0);
g_return_val_if_fail (GST_IS_ELEMENT (bvw->priv->play), 0.0);
- g_object_get (G_OBJECT (bvw->priv->play), "volume", &vol, NULL);
-+ if (bvw->priv->pulse_audio_sink) {
-+ g_object_get (G_OBJECT (bvw->priv->pulse_audio_sink), "volume", &vol, NULL);
-+ } else {
-+ g_object_get (G_OBJECT (bvw->priv->play), "volume", &vol, NULL);
-+ }
-
- return vol;
+-
+- return vol;
++ return bvw->priv->volume;
}
-@@ -4947,6 +4962,21 @@
+
+ void
+@@ -4935,6 +4957,27 @@
g_mutex_unlock (bvw->priv->lock);
}
+static gboolean
+notify_volume_idle_cb (BaconVideoWidget *bvw)
+{
++ gdouble vol;
++
++ g_object_get (G_OBJECT (bvw->priv->pulse_audio_sink), "volume", &vol, NULL);
++ bvw->priv->volume = vol;
++
+ g_object_notify (G_OBJECT (bvw), "volume");
++
+ return FALSE;
+}
+
@@ -78,13 +104,13 @@
+ GParamSpec *pspec,
+ BaconVideoWidget *bvw)
+{
-+ g_idle_add (notify_volume_idle_cb, bvw);
++ g_idle_add ((GSourceFunc) notify_volume_idle_cb, bvw);
+}
+
GtkWidget *
bacon_video_widget_new (int width, int height,
BvwUseType type, GError ** err)
-@@ -5014,15 +5044,18 @@
+@@ -5000,15 +5043,18 @@
cb_gconf, bvw, NULL, NULL);
if (type == BVW_USE_TYPE_VIDEO || type == BVW_USE_TYPE_AUDIO) {
@@ -111,7 +137,7 @@
}
} else {
audio_sink = gst_element_factory_make ("fakesink", "audio-fake-sink");
-@@ -5171,9 +5204,19 @@
+@@ -5155,9 +5201,19 @@
/* make fakesink sync to the clock like a real sink */
g_object_set (audio_sink, "sync", TRUE, NULL);
GST_DEBUG ("audio sink doesn't work, using fakesink instead");
Index: totem.spec
===================================================================
RCS file: /cvs/pkgs/rpms/totem/devel/totem.spec,v
retrieving revision 1.233
retrieving revision 1.234
diff -u -r1.233 -r1.234
--- totem.spec 1 Apr 2009 22:18:30 -0000 1.233
+++ totem.spec 2 Apr 2009 16:53:57 -0000 1.234
@@ -9,7 +9,7 @@
Summary: Movie player for GNOME
Name: totem
Version: 2.26.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+ with exceptions
Group: Applications/Multimedia
URL: http://projects.gnome.org/totem/
@@ -478,6 +478,11 @@
%endif
%changelog
+* Thu Apr 02 2009 - Bastien Nocera <bnocera at redhat.com> - 2.26.1-2
+- Update patch to set the PA stream volume, avoids setting the
+ volume when pulsesink isn't in a state where it has a stream
+ (#488532)
+
* Wed Apr 01 2009 - Bastien Nocera <bnocera at redhat.com> - 2.26.1-1
- Update to 2.26.1
More information about the scm-commits
mailing list