<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I think you need a <a moz-do-not-send="true"
href="https://gstreamer.freedesktop.org/documentation/additional/design/probes.html?gi-language=c#blocking-probes">blocking
probe</a> for that. Whenever you switch inputs, install blocking
probes on the inactive inputs (and unblock the active input).
However, when you unblock an input, those buffers waiting will be
old. You may have to update their PTS times to prevent the sink
from dropping them as "too late".<br>
</p>
<div class="moz-cite-prefix">On 17-06-2022 05:09, Steve W wrote:<br>
</div>
<blockquote type="cite"
cite="mid:53920c2e-dce9-4437-b4be-c83b319fa052@Spark">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<div name="messageBodySection">
<div dir="auto">Hi Michiel,<br>
<br>
I see. Is there a way to not drop the buffers from inactive
streams? Perhaps somehow block the queue?<br>
<br>
Thanks<br>
<br>
Steve</div>
</div>
<div name="messageReplySection">On 17 Jun 2022, 6:47 AM +1000,
Michiel Konstapel via gstreamer-devel
<a class="moz-txt-link-rfc2396E" href="mailto:gstreamer-devel@lists.freedesktop.org"><gstreamer-devel@lists.freedesktop.org></a>, wrote:<br>
<blockquote type="cite" style="border-left-color: grey;
border-left-width: thin; border-left-style: solid; margin: 5px
5px;padding-left: 10px;">On 16-06-2022 19:52, Steve W via
gstreamer-devel wrote:<br>
<blockquote type="cite">Hello all<br>
<br>
I’m trying to switch between two queues using
input-selector:<br>
<br>
input-selector name=i sync-streams=true sync-mode=clock<br>
cache-buffers=true<br>
… ! queue max-size-time=0 name=q1 ! i.<br>
… ! queue max-size-time=0 name=q2 ! i.<br>
i. ! fakesink<br>
<br>
I’ve added buffer probes to the sources of q1 and q2. Even
when the<br>
input-selector has the active pad set to one stream, both of
the<br>
buffer probes are triggered. Regardless of the duration
rolled,<br>
current-level-buffers is always 0 for both q1 and q2. It
seems to<br>
suggest that both queues are consumed even when the active
pad is set<br>
to only one stream. Does anyone know why this might be the
case?<br>
<br>
Thanks<br>
</blockquote>
<br>
If I understand correctly, even with those properties, the<br>
input-selector will consume buffers from all its inputs, but
drop<br>
everything except buffers from the active pad. `cache-buffers`
only<br>
applies to (quoting the docs) "buffers still considered valid
(after<br>
current running time, see sync-mode)". Even in that case, they
will have<br>
been consumed from the queue, and when their time has passed,
they'll<br>
still be dropped.<br>
Michiel<br>
</blockquote>
</div>
</blockquote>
<div class="moz-signature">-- <br>
Michiel Konstapel<br>
<i>Lead Software Developer</i><br>
<a href="https://www.aanmelder.nl">aanmelder.nl</a><br>
<br>
T: +31(0)15 2400 119<br>
E: <a class="moz-txt-link-abbreviated" href="mailto:michiel@aanmelder.nl">michiel@aanmelder.nl</a><br>
</div>
</body>
</html>