AW: valve, unexpected functionality

Thornton, Keith keith.thornton at zeiss.com
Thu Nov 20 02:13:40 PST 2014


Hello Sebastian
Thank you for your answer. I will go the way of changing the pipeline dynamically.
Fyi. Under windows, setting async=false leads to the EOS handling not being executed so the pipeline doesn't go from PLAYING to PAUSED ...
I then have to terminate it with Ctrl-C.
Regards.

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] Im Auftrag von Sebastian Dröge
Gesendet: Donnerstag, 20. November 2014 10:13
An: Discussion of the development of and with GStreamer
Betreff: Re: valve, unexpected functionality

On Mo, 2014-11-17 at 08:27 +0000, Thornton, Keith wrote:
> Hi,
> The following pipeline
> gst-launch-1.0.exe -v videotestsrc do-timestamp=true pattern=snow 
> is-live=true num-buffers=900 ! 
> video/x-raw,width=1920,height=1080,framerate=30000/1001,format=YV12 ! 
> tee name=t1 ! queue name=displ -queue max-size-bytes=0 leaky=2 ! valve 
> name=display-valve drop=false ! glimagesink sync=false t1. ! queue 
> name=encode-queue max-size-bytes=124416000 ! valve name=encode-valve 
> drop=false ! x264enc
> trate=32768 ! h264parse ! qtmux ! filesink location="f:/temp/out.mp4"
> 
> produces snow on my display (somewhat delayed which is not important) and a mp4 file.
> This is running the current git master version on a Windows 7 machine.
> When I change the first valve drop to true I neither get snow on the display (expected and wanted) nor do I get a file (perhaps expected but not wanted sid-effect).
> Is this due to the fact that the pipeline as a whole cannot preroll?

Yes, the pipeline will only preroll if all sinks are prerolled... which they can't in this case because the valve never lets any data go through.

> Would I be better using a pad probe and letting the pipeline preroll before blocking the relevant pad.
> If anyone can provide an explanation I would be grateful.

You could dynamically change the pipeline during runtime, yes. Or you could set async=false (not sync! both properties have completely different meaning) on the sink after the valve. With async=false the sink will go to PAUSED state immediately without prerolling if that is what you want. sync=false will disable synchronization to the clock, which should be irrelevant here.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


More information about the gstreamer-devel mailing list