summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-10-30 09:24:03 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-10-30 09:24:03 +0100
commit598c9376342b4f67012d1d418c090f432fc26d27 (patch)
tree801826da55c8812b92d48462da0c317760a561b9
parentd85dadc122d40608ee304516702b479fb79c8ed7 (diff)
playsink: If notify::{volume,mute} is triggered by the volume element, update our internal state
-rw-r--r--gst/playback/gstplaysink.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c
index 9809196b9..a4812037c 100644
--- a/gst/playback/gstplaysink.c
+++ b/gst/playback/gstplaysink.c
@@ -1422,15 +1422,24 @@ gen_subp_chain (GstPlaySink * playsink)
}
static void
-notify_volume_cb (GObject * selector, GParamSpec * pspec,
- GstPlaySink * playsink)
+notify_volume_cb (GObject * object, GParamSpec * pspec, GstPlaySink * playsink)
{
+ gdouble vol;
+
+ g_object_get (object, "volume", &vol, NULL);
+ playsink->volume = vol;
+
g_object_notify (G_OBJECT (playsink), "volume");
}
static void
-notify_mute_cb (GObject * selector, GParamSpec * pspec, GstPlaySink * playsink)
+notify_mute_cb (GObject * object, GParamSpec * pspec, GstPlaySink * playsink)
{
+ gboolean mute;
+
+ g_object_get (object, "mute", &mute, NULL);
+ playsink->mute = mute;
+
g_object_notify (G_OBJECT (playsink), "mute");
}