mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 10:41:04 +00:00
pulsesink: Post provide-clock message on the bus if the clock appears/disappears
Fixes bug #620277.
This commit is contained in:
parent
00ba834995
commit
f5057a9fae
1 changed files with 6 additions and 0 deletions
|
@ -2323,6 +2323,9 @@ gst_pulsesink_change_state (GstElement * element, GstStateChange transition)
|
||||||
GST_BASE_AUDIO_SINK (pulsesink)->provided_clock =
|
GST_BASE_AUDIO_SINK (pulsesink)->provided_clock =
|
||||||
gst_audio_clock_new ("GstPulseSinkClock",
|
gst_audio_clock_new ("GstPulseSinkClock",
|
||||||
(GstAudioClockGetTimeFunc) gst_pulsesink_get_time, pulsesink);
|
(GstAudioClockGetTimeFunc) gst_pulsesink_get_time, pulsesink);
|
||||||
|
gst_element_post_message (element,
|
||||||
|
gst_message_new_clock_provide (GST_OBJECT_CAST (element),
|
||||||
|
GST_BASE_AUDIO_SINK (pulsesink)->provided_clock, TRUE));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -2332,6 +2335,9 @@ gst_pulsesink_change_state (GstElement * element, GstStateChange transition)
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
|
gst_element_post_message (element,
|
||||||
|
gst_message_new_clock_provide (GST_OBJECT_CAST (element), NULL,
|
||||||
|
FALSE));
|
||||||
if (GST_BASE_AUDIO_SINK (pulsesink)->provided_clock)
|
if (GST_BASE_AUDIO_SINK (pulsesink)->provided_clock)
|
||||||
gst_object_unref (GST_BASE_AUDIO_SINK (pulsesink)->provided_clock);
|
gst_object_unref (GST_BASE_AUDIO_SINK (pulsesink)->provided_clock);
|
||||||
GST_BASE_AUDIO_SINK (pulsesink)->provided_clock = NULL;
|
GST_BASE_AUDIO_SINK (pulsesink)->provided_clock = NULL;
|
||||||
|
|
Loading…
Reference in a new issue