Dynamically start and stop recording with tee branch to create seekable videos
tim at centricular.com
Thu Dec 12 17:43:59 UTC 2019
On Wed, 2019-12-11 at 15:43 -0600, gstreamer_webcam wrote:
> Hello, I'm trying to start and stop a recording with a tee branch.
> Every time when asked to start recording, tee will create a new
> branch with a unique id. When asked to stop recording, the tee branch
> will be stopped and removed (the other tee branch and pipeline is
> still functioning). How can I send EOS to make the generated videos
> but I don't know how to check if the EOS actually reaches the
> filesink before setting the pipeline state to NULL.
> Any ideas or code snippet would be appreciated.
There is similar code in here (with extra feature to have some backlog
when you start recording, the code will get much more compact if you
Important bits to grep for are "message-forward" and "GstBinForwarded".
(The main purpose here is to make sure to bypass the ususal
pipeline/bin EOS aggregation logic so that the application can pick up
the EOS from the filesink in one branch even if the sinks on the other
branches are not EOS yet.).
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel