rpms/totem/F-11 0001-Set-the-PA-stream-volume-from-Totem.patch, 1.3, 1.4 totem.spec, 1.248, 1.249

Bastien Nocera hadess at fedoraproject.org
Tue Oct 20 14:08:45 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/totem/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14845

Modified Files:
	0001-Set-the-PA-stream-volume-from-Totem.patch totem.spec 
Log Message:
* Tue Oct 20 2009 Bastien Nocera <bnocera at redhat.com> 2.26.4-2
- Update pulsesink patch to use cubic volumes (#512090)


0001-Set-the-PA-stream-volume-from-Totem.patch:
 configure.in                              |    2 
 src/backend/bacon-video-widget-gst-0.10.c |  118 ++++++++++++++++++++++++------
 2 files changed, 99 insertions(+), 21 deletions(-)

Index: 0001-Set-the-PA-stream-volume-from-Totem.patch
===================================================================
RCS file: /cvs/pkgs/rpms/totem/F-11/0001-Set-the-PA-stream-volume-from-Totem.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- 0001-Set-the-PA-stream-volume-from-Totem.patch	19 Oct 2009 15:23:37 -0000	1.3
+++ 0001-Set-the-PA-stream-volume-from-Totem.patch	20 Oct 2009 14:08:45 -0000	1.4
@@ -1,4 +1,4 @@
-From 8d4d326c9bcfca643782ead1f5f7ced58485b62d Mon Sep 17 00:00:00 2001
+From 3c3d8037804586fb0a3bc42141b1ef5b38d521c8 Mon Sep 17 00:00:00 2001
 From: Bastien Nocera <hadess at hadess.net>
 Date: Mon, 19 Oct 2009 16:21:42 +0100
 Subject: [PATCH] Set the PA stream volume from Totem
@@ -8,14 +8,14 @@ Subject: [PATCH] Set the PA stream volum
 - avoid setting the volume when pulsesink isn't in a state where it has
 a stream
 - don't set the volume on the stream on startup when using pulsesink
-- use bicubic volumes in the interface
+- use cubic volumes in the interface
 ---
  configure.in                              |    2 +-
- src/backend/bacon-video-widget-gst-0.10.c |   92 +++++++++++++++++++++++------
- 2 files changed, 74 insertions(+), 20 deletions(-)
+ src/backend/bacon-video-widget-gst-0.10.c |  117 ++++++++++++++++++++++++-----
+ 2 files changed, 99 insertions(+), 20 deletions(-)
 
 diff --git a/configure.in b/configure.in
-index d3d4142..587a878 100644
+index 3d10205..bcf459b 100644
 --- a/configure.in
 +++ b/configure.in
 @@ -62,7 +62,7 @@ dnl release versions.
@@ -28,10 +28,19 @@ index d3d4142..587a878 100644
  AC_ARG_ENABLE(xine,
  	AC_HELP_STRING([--enable-xine], [use xine instead of GStreamer for the backend]),
 diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
-index e43e068..da5203f 100644
+index e43e068..cbe483d 100644
 --- a/src/backend/bacon-video-widget-gst-0.10.c
 +++ b/src/backend/bacon-video-widget-gst-0.10.c
-@@ -163,7 +163,9 @@ struct BaconVideoWidgetPrivate
+@@ -42,6 +42,8 @@
+ #include <gst/audio/gstbaseaudiosink.h>
+ /* for pretty multichannel strings */
+ #include <gst/audio/multichannel.h>
++/* for the volume property */
++#include <gst/interfaces/streamvolume.h>
+ 
+ /* for missing decoder/demuxer detection */
+ #include <gst/pbutils/pbutils.h>
+@@ -163,7 +165,9 @@ struct BaconVideoWidgetPrivate
    gboolean                     cursor_shown;
    gboolean                     fullscreen_mode;
    gboolean                     auto_resize;
@@ -42,7 +51,7 @@ index e43e068..da5203f 100644
    
    gint                         video_width; /* Movie width */
    gint                         video_height; /* Movie height */
-@@ -1105,6 +1107,7 @@ bacon_video_widget_init (BaconVideoWidget * bvw)
+@@ -1105,6 +1109,7 @@ bacon_video_widget_init (BaconVideoWidget * bvw)
    priv->audiotags = NULL;
    priv->videotags = NULL;
    priv->zoom = 100;
@@ -50,7 +59,7 @@ index e43e068..da5203f 100644
  
    priv->lock = g_mutex_new ();
  
-@@ -1879,6 +1882,11 @@ bacon_video_widget_finalize (GObject * object)
+@@ -1879,6 +1884,11 @@ bacon_video_widget_finalize (GObject * object)
    g_free (bvw->priv->vis_element_name);
    bvw->priv->vis_element_name = NULL;
  
@@ -62,7 +71,7 @@ index e43e068..da5203f 100644
    if (bvw->priv->vis_plugins_list) {
      g_list_free (bvw->priv->vis_plugins_list);
      bvw->priv->vis_plugins_list = NULL;
-@@ -1986,7 +1994,7 @@ bacon_video_widget_get_property (GObject * object, guint property_id,
+@@ -1986,7 +1996,7 @@ bacon_video_widget_get_property (GObject * object, guint property_id,
        bacon_video_widget_get_show_cursor (bvw));
        break;
      case PROP_VOLUME:
@@ -71,7 +80,7 @@ index e43e068..da5203f 100644
        break;
      default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-@@ -3133,7 +3141,7 @@ bacon_video_widget_can_set_volume (BaconVideoWidget * bvw)
+@@ -3133,7 +3143,7 @@ bacon_video_widget_can_set_volume (BaconVideoWidget * bvw)
    if (bvw->priv->speakersetup == BVW_AUDIO_SOUND_AC3PASSTHRU)
      return FALSE;
  
@@ -80,7 +89,7 @@ index e43e068..da5203f 100644
  }
  
  void
-@@ -3142,11 +3150,29 @@ bacon_video_widget_set_volume (BaconVideoWidget * bvw, double volume)
+@@ -3142,11 +3152,35 @@ bacon_video_widget_set_volume (BaconVideoWidget * bvw, double volume)
    g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
    g_return_if_fail (GST_IS_ELEMENT (bvw->priv->play));
  
@@ -100,8 +109,14 @@ index e43e068..da5203f 100644
 +      gst_element_get_state (bvw->priv->pulse_audio_sink, &cur_state, NULL, 0);
 +      if (cur_state == GST_STATE_READY || cur_state == GST_STATE_PLAYING)
 +      {
-+	g_object_set (bvw->priv->pulse_audio_sink, "volume",
-+		      (gdouble) volume, NULL);
++	if (gst_element_implements_interface (bvw->priv->pulse_audio_sink,
++					      GST_TYPE_STREAM_VOLUME)) {
++	  gst_stream_volume_set_volume (GST_STREAM_VOLUME (bvw->priv->pulse_audio_sink),
++					GST_STREAM_VOLUME_FORMAT_CUBIC,
++					volume);
++	} else {
++	  g_object_set (bvw->priv->pulse_audio_sink, "volume", volume, NULL);
++	}
 +      }
 +    } else {
 +      g_object_set (bvw->priv->play, "volume",
@@ -112,7 +127,7 @@ index e43e068..da5203f 100644
      g_object_notify (G_OBJECT (bvw), "volume");
    }
  }
-@@ -3154,14 +3180,10 @@ bacon_video_widget_set_volume (BaconVideoWidget * bvw, double volume)
+@@ -3154,14 +3188,10 @@ bacon_video_widget_set_volume (BaconVideoWidget * bvw, double volume)
  double
  bacon_video_widget_get_volume (BaconVideoWidget * bvw)
  {
@@ -128,8 +143,8 @@ index e43e068..da5203f 100644
  }
  
  void
-@@ -4940,6 +4962,27 @@ got_new_video_sink_bin_element (GstBin *video_sink, GstElement *element,
-   g_mutex_unlock (bvw->priv->lock);
+@@ -3671,6 +3701,44 @@ done:
+   return ret;
  }
  
 +static gboolean
@@ -137,7 +152,13 @@ index e43e068..da5203f 100644
 +{
 +  gdouble vol;
 +
-+  g_object_get (G_OBJECT (bvw->priv->pulse_audio_sink), "volume", &vol, NULL);
++  if (gst_element_implements_interface (bvw->priv->pulse_audio_sink,
++					GST_TYPE_STREAM_VOLUME)) {
++    vol = gst_stream_volume_get_volume (GST_STREAM_VOLUME (bvw->priv->pulse_audio_sink),
++					GST_STREAM_VOLUME_FORMAT_CUBIC);
++  } else {
++    g_object_get (G_OBJECT (bvw->priv->pulse_audio_sink), "volume", &vol, NULL);
++  }
 +  bvw->priv->volume = vol;
 +
 +  g_object_notify (G_OBJECT (bvw), "volume");
@@ -153,10 +174,21 @@ index e43e068..da5203f 100644
 +  g_idle_add ((GSourceFunc) notify_volume_idle_cb, bvw);
 +}
 +
- GtkWidget *
- bacon_video_widget_new (int width, int height,
-                         BvwUseType type, GError ** err)
-@@ -5005,15 +5048,18 @@ bacon_video_widget_new (int width, int height,
++/**
++ * bacon_video_widget_set_video_property:
++ * @bvw: a #BaconVideoWidget
++ * @type: the type of property
++ * @value: the property's value, in the range %0 to %G_MAXINT
++ *
++ * Sets the given property of the video, such as its brightness or saturation.
++ *
++ * It should be given as a percentage in the full range of integer values; from %0
++ * to %G_MAXINT, where %G_MAXINT/2 is the default.
++ **/
+ void
+ bacon_video_widget_set_video_property (BaconVideoWidget *bvw,
+                                        BaconVideoWidgetVideoProperty type,
+@@ -5005,15 +5073,18 @@ bacon_video_widget_new (int width, int height,
        cb_gconf, bvw, NULL, NULL);
  
    if (type == BVW_USE_TYPE_VIDEO || type == BVW_USE_TYPE_AUDIO) {
@@ -183,7 +215,7 @@ index e43e068..da5203f 100644
      }
    } else {
      audio_sink = gst_element_factory_make ("fakesink", "audio-fake-sink");
-@@ -5160,9 +5206,17 @@ bacon_video_widget_new (int width, int height,
+@@ -5160,9 +5231,17 @@ bacon_video_widget_new (int width, int height,
        /* 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/F-11/totem.spec,v
retrieving revision 1.248
retrieving revision 1.249
diff -u -p -r1.248 -r1.249
--- totem.spec	20 Oct 2009 12:22:47 -0000	1.248
+++ totem.spec	20 Oct 2009 14:08:45 -0000	1.249
@@ -9,7 +9,7 @@
 Summary: Movie player for GNOME
 Name: totem
 Version: 2.26.4
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+ with exceptions
 Group: Applications/Multimedia
 URL: http://projects.gnome.org/totem/
@@ -483,6 +483,9 @@ fi
 %endif
 
 %changelog
+* Tue Oct 20 2009 Bastien Nocera <bnocera at redhat.com> 2.26.4-2
+- Update pulsesink patch to use cubic volumes (#512090)
+
 * Tue Oct 20 2009 Bastien Nocera <bnocera at redhat.com> 2.26.4-1
 - Update to 2.26.4
 




More information about the fedora-extras-commits mailing list