How is timing respected?

John McDermott egglue at gmail.com
Sat Jun 18 02:51:24 UTC 2022


Hello all,

I’m trying to have a better grasp of how input-selector works. I see the following lines are responsible for advancing the active pad by reading off the pad’s buffer:

while (!sel->eos && !sel->flushing && !selpad->flushing &&
 (cached_buffer = g_queue_pop_head (selpad->cached_buffers))) {
 GST_DEBUG_OBJECT (pad, "Cached buffers found, "
 "invoking chain for cached buffer %p", cached_buffer->buffer);

 selpad->segment = cached_buffer->segment;
 selpad->events_pending = TRUE;
 GST_INPUT_SELECTOR_UNLOCK (sel);
 gst_selector_pad_chain (pad, parent, cached_buffer->buffer);

https://github.com/Kurento/gstreamer/blob/master/plugins/elements/gstinputselector.c#L1006-L1014

My take is that unless the element is flushing or EOS has been received, the recursion reads all cached buffers and pushes them to the source pad:

res = gst_pad_push (sel->srcpad, buf);

https://github.com/Kurento/gstreamer/blob/84c84bf8fb75d372bc740308e68d7c1030277b4f/plugins/elements/gstinputselector.c#L1109

But how is timing between cached buffers/frames respected? The cached buffers appear to be pushed to the source pad without timing checks.

Thanks for any advice.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220618/9b91319e/attachment.htm>


More information about the gstreamer-devel mailing list