How is timing respected?

John McDermott egglue at gmail.com
Sat Jun 18 03:17:13 UTC 2022


Apologies. I should have linked to the official repo instead https://github.com/GStreamer/gstreamer/blob/a02f0ea3922ffacde04731108b19fcfc8037e00a/subprojects/gstreamer/plugins/elements/gstinputselector.c#L1028-L1036
On 18 Jun 2022, 12:51 PM +1000, John McDermott via gstreamer-devel <gstreamer-devel at lists.freedesktop.org>, wrote:
> 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/51a22c13/attachment.htm>


More information about the gstreamer-devel mailing list