Queues empty even when stream is inactive

Steve W s.wong.731 at gmail.com
Sat Jun 18 02:39:28 UTC 2022


Thank you!
On 18 Jun 2022, 8:13 AM +1000, Michiel Konstapel <michiel at aanmelder.nl>, wrote:
> I think you need a blocking probe 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".
> On 17-06-2022 05:09, Steve W wrote:
> > Hi Michiel,
> >
> > I see. Is there a way to not drop the buffers from inactive streams?  Perhaps somehow block the queue?
> >
> > Thanks
> >
> > Steve
> > On 17 Jun 2022, 6:47 AM +1000, Michiel Konstapel via gstreamer-devel <gstreamer-devel at lists.freedesktop.org>, wrote:
> > > On 16-06-2022 19:52, Steve W via gstreamer-devel wrote:
> > > > Hello all
> > > >
> > > > I’m trying to switch between two queues using input-selector:
> > > >
> > > > input-selector name=i sync-streams=true sync-mode=clock
> > > > cache-buffers=true
> > > > … ! queue max-size-time=0 name=q1 ! i.
> > > > … ! queue max-size-time=0 name=q2 ! i.
> > > > i. ! fakesink
> > > >
> > > > I’ve added buffer probes to the sources of q1 and q2. Even when the
> > > > input-selector has the active pad set to one stream, both of the
> > > > buffer probes are triggered. Regardless of the duration rolled,
> > > > current-level-buffers is always 0 for both q1 and q2. It seems to
> > > > suggest that both queues are consumed even when the active pad is set
> > > > to only one stream. Does anyone know why this might be the case?
> > > >
> > > > Thanks
> > >
> > > If I understand correctly, even with those properties, the
> > > input-selector will consume buffers from all its inputs, but drop
> > > everything except buffers from the active pad. `cache-buffers` only
> > > applies to (quoting the docs) "buffers still considered valid (after
> > > current running time, see sync-mode)". Even in that case, they will have
> > > been consumed from the queue, and when their time has passed, they'll
> > > still be dropped.
> > > Michiel
> --
> Michiel Konstapel
> Lead Software Developer
> aanmelder.nl
>
> T: +31(0)15 2400 119
> E: michiel at aanmelder.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220618/8b07e34f/attachment-0001.htm>


More information about the gstreamer-devel mailing list