mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
aggregator: Wake up source pad in PAUSED<->PLAYING transitions
When going to PLAYING we will now have a clock and can stop waiting on the condition variable and instead start waiting on the clock if necessary for the current configuration. In the other direction when going to PAUSED the clock might have disappeared and we might need to wait on the condition variable again instead. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/653>
This commit is contained in:
parent
bc81eaf103
commit
56d696200a
1 changed files with 10 additions and 0 deletions
|
@ -1834,6 +1834,11 @@ gst_aggregator_change_state (GstElement * element, GstStateChange transition)
|
|||
if (!gst_aggregator_start (self))
|
||||
goto error_start;
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
/* Wake up any waiting as now we have a clock and can do
|
||||
* proper waiting on the clock if necessary */
|
||||
SRC_BROADCAST (self);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1851,6 +1856,11 @@ gst_aggregator_change_state (GstElement * element, GstStateChange transition)
|
|||
GST_ERROR_OBJECT (self, "Subclass failed to stop.");
|
||||
}
|
||||
break;
|
||||
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
|
||||
/* Wake up any waiting as now clock might be gone and we might
|
||||
* need to wait on the condition variable again */
|
||||
SRC_BROADCAST (self);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue