How to operate "valve" element

bb.bills at bb.bills at
Tue Feb 25 01:27:11 UTC 2020

> The filesrc element will read from the file as fast as possible and it
> is only being slowed down by the application's speed reading from the
> appsink. If you set drop=true on the valve, then there is nothing
> stopping the filesrc from reading the whole file and promptly dropping
> the results. If you want to have something like this, you need to fake
> a live source with something like "filesrc ! parsebin ! identity
> sync=true ! valve ! appsink". You use parsebin (or the specific element
> to parser your file) to put appropriate timestamps on the buffers, then
> "identity sync=1" to block the buffers until the timestamp is reached.

oh, i see; my mental model how it all works was too simplistic;

ended up using:
    filesrc ! waveparse ! identity sync=true ! valve ! appsink

as was having problems with creating parsebin src pad - am guessing that 
needs to be done in a callback;
the above pipeline appears to be doing what i wanted;

thanks for the explanation

More information about the gstreamer-devel mailing list