Automatically set pipeline to paused after X frames

mdb mikeybards at
Wed Mar 31 21:59:49 UTC 2021

I setup the following pipeline /v4l2src device=/dev/video0 num-buffers=5 !
filesink location=/tmp/ in a function, which returns a GStreamer
element (writing in OCaml) in *paused* state. I then set the state to
*playing* manually and see the expected files in /tmp. However, the pipeline
remains in *playing* after the 5 buffers have been stored in / I
would like the pipeline to reset itself to *stop* after the 5 buffers have
been collected. I have not found anything to achieve this yet; I briefly
read through  position tracking and seeking
&  pipeline manipulation
. I am comfortable stubbing C functions in OCaml, I just cannot figure out
what to stub.

Sent from:

More information about the gstreamer-devel mailing list