[Xfce4-commits] <parole:bluesabre/gtk3> Switch to the gst-helper for setting the volume Instead of the GObject method used before, as the helper seems to keep the volume in sync with pulseaudio better

Simon Steinbeiss noreply at xfce.org
Sun Aug 11 15:17:28 CEST 2013


Updating branch refs/heads/bluesabre/gtk3
         to 1e3ff23b808b673923d13958cb09f6e39aee0a8e (commit)
       from 171af0ced543b2e3d2f79e49d0326b43dfc5a0f8 (commit)

commit 1e3ff23b808b673923d13958cb09f6e39aee0a8e
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Wed Mar 27 01:11:13 2013 +0100

    Switch to the gst-helper for setting the volume
    Instead of the GObject method used before, as the helper seems to keep the volume in sync with pulseaudio better

 src/gst/parole-gst.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c
index f81102c..9b415ec 100644
--- a/src/gst/parole-gst.c
+++ b/src/gst/parole-gst.c
@@ -33,9 +33,11 @@
 #if GST_CHECK_VERSION(1, 0, 0)
 #include <gst/video/videooverlay.h>
 #include <gst/video/navigation.h>
+#include <gst/audio/streamvolume.h>
 #else
 #include <gst/interfaces/xoverlay.h>
 #include <gst/interfaces/navigation.h>
+#include <gst/interfaces/streamvolume.h>
 #endif
 
 #include <gst/pbutils/missing-plugins.h>
@@ -2624,9 +2626,9 @@ void parole_gst_seek (ParoleGst *gst, gdouble seek)
 
 void parole_gst_set_volume (ParoleGst *gst, gdouble value)
 {
-    g_object_set (G_OBJECT (gst->priv->playbin),
-		  "volume", value,
-		  NULL);
+    gst_stream_volume_set_volume (GST_STREAM_VOLUME (gst->priv->playbin),
+				    GST_STREAM_VOLUME_FORMAT_CUBIC,
+				    value);
 }
 						    
 gdouble	parole_gst_get_volume (ParoleGst *gst)


More information about the Xfce4-commits mailing list