<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Hello all,<br />
<br />
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:<br />
<br />
while (!sel->eos && !sel->flushing && !selpad->flushing &&<br />
(cached_buffer = g_queue_pop_head (selpad->cached_buffers))) {<br />
GST_DEBUG_OBJECT (pad, "Cached buffers found, "<br />
"invoking chain for cached buffer %p", cached_buffer->buffer);<br />
<br />
selpad->segment = cached_buffer->segment;<br />
selpad->events_pending = TRUE;<br />
GST_INPUT_SELECTOR_UNLOCK (sel);<br />
gst_selector_pad_chain (pad, parent, cached_buffer->buffer);<br />
<br />
<a href="https://github.com/Kurento/gstreamer/blob/master/plugins/elements/gstinputselector.c#L1006-L1014" target="_blank">https://github.com/Kurento/gstreamer/blob/master/plugins/elements/gstinputselector.c#L1006-L1014</a><br />
<br />
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:<br />
<br />
res = gst_pad_push (sel->srcpad, buf);<br />
<br />
<a href="https://github.com/Kurento/gstreamer/blob/84c84bf8fb75d372bc740308e68d7c1030277b4f/plugins/elements/gstinputselector.c#L1109" target="_blank">https://github.com/Kurento/gstreamer/blob/84c84bf8fb75d372bc740308e68d7c1030277b4f/plugins/elements/gstinputselector.c#L1109</a><br />
<br />
But how is timing between cached buffers/frames respected? The cached buffers appear to be pushed to the source pad without timing checks.<br />
<br />
Thanks for any advice.<br />
<br />
John</div>
</div>
</body>
</html>