mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
pulsesink: Post CLOCK-LOST/CLOCK-PROVIDE when going to/from READY
Otherwise the clocks are redistributed every time the pipeline goes to PAUSED, which is quite expensive.
This commit is contained in:
parent
af70b300cc
commit
f6240a4773
1 changed files with 2 additions and 2 deletions
|
@ -2519,7 +2519,7 @@ gst_pulsesink_change_state (GstElement * element, GstStateChange transition)
|
|||
(GstAudioClockGetTimeFunc) gst_pulsesink_get_time, pulsesink);
|
||||
#endif
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||
gst_element_post_message (element,
|
||||
gst_message_new_clock_provide (GST_OBJECT_CAST (element),
|
||||
GST_BASE_AUDIO_SINK (pulsesink)->provided_clock, TRUE));
|
||||
|
@ -2531,7 +2531,7 @@ gst_pulsesink_change_state (GstElement * element, GstStateChange transition)
|
|||
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
|
||||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
gst_element_post_message (element,
|
||||
gst_message_new_clock_lost (GST_OBJECT_CAST (element),
|
||||
GST_BASE_AUDIO_SINK (pulsesink)->provided_clock));
|
||||
|
|
Loading…
Reference in a new issue