[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-devel
Subject:    Re: How is timing respected?
From:       John McDermott via gstreamer-devel <gstreamer-devel () lists ! freedesktop ! org>
Date:       2022-06-18 3:17:13
Message-ID: af101cd5-0874-44d6-90ef-cdfacbeff55e () Spark
[Download RAW message or body]

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@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


[Attachment #3 (text/html)]

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Apologies. I should have linked to the official repo instead&#160;<a \
href="https://github.com/GStreamer/gstreamer/blob/a02f0ea3922ffacde04731108b19fcfc8037e00a/subprojects/gstreamer/plugins/elements/gstinputselector.c#L1028-L1036" \
target="_blank">https://github.com/GStreamer/gstreamer/blob/a02f0ea3922ffacde04731108b \
19fcfc8037e00a/subprojects/gstreamer/plugins/elements/gstinputselector.c#L1028-L1036</a></div>
 </div>
<div name="messageReplySection">On 18 Jun 2022, 12:51 PM +1000, John McDermott via \
gstreamer-devel &lt;gstreamer-devel@lists.freedesktop.org&gt;, wrote:<br /> \
<blockquote type="cite" style="border-left-color: grey; border-left-width: thin; \
border-left-style: solid; margin: 5px 5px;padding-left: 10px;"> <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-&gt;eos &amp;&amp; !sel-&gt;flushing &amp;&amp; !selpad-&gt;flushing \
&amp;&amp;<br /> &#160;(cached_buffer = g_queue_pop_head \
(selpad-&gt;cached_buffers))) {<br /> &#160;GST_DEBUG_OBJECT (pad, "Cached buffers \
found, "<br /> &#160;"invoking chain for cached buffer %p", \
cached_buffer-&gt;buffer);<br /> <br />
&#160;selpad-&gt;segment = cached_buffer-&gt;segment;<br />
&#160;selpad-&gt;events_pending = TRUE;<br />
&#160;GST_INPUT_SELECTOR_UNLOCK (sel);<br />
&#160;gst_selector_pad_chain (pad, parent, cached_buffer-&gt;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-&gt;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>
</blockquote>
</div>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic