mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
playsink: If notify::{volume,mute} is triggered by the volume element, update our internal state
This commit is contained in:
parent
d85dadc122
commit
598c937634
1 changed files with 12 additions and 3 deletions
|
@ -1422,15 +1422,24 @@ gen_subp_chain (GstPlaySink * playsink)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
notify_volume_cb (GObject * selector, GParamSpec * pspec,
|
notify_volume_cb (GObject * object, GParamSpec * pspec, GstPlaySink * playsink)
|
||||||
GstPlaySink * playsink)
|
|
||||||
{
|
{
|
||||||
|
gdouble vol;
|
||||||
|
|
||||||
|
g_object_get (object, "volume", &vol, NULL);
|
||||||
|
playsink->volume = vol;
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (playsink), "volume");
|
g_object_notify (G_OBJECT (playsink), "volume");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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");
|
g_object_notify (G_OBJECT (playsink), "mute");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue