Dynamic addition and removal of filesink to pipeline
Stephan Boltzmann
stephan.boltzmann at posteo.de
Wed Sep 30 13:36:41 UTC 2020
Hello everybody out there using GStreamer,
My program (written in C) is streaming/displaying video to the screen
and writes it to a file at the same time.
I would like to write to a file based on a condition.
This can be achieved with 'dynamic pipelines' in GStreamer as far as I
see.
There is an example of a dynamic pipeline in the official GStreamer
documentation and I also found some code on GitHub
(https://gist.github.com/crearo/1dc01b93b2b513e0000f183144c61b20), but I
don't get the gist of it:
The functions `gst_bin_remove` and `gst_object_unref` are called with
the tee element as an character there.
Is this the most elegant way to achive what I want to implement?
Wouldn't it be more elegant to switch the filesink on and off
dynamically?
Kind regards
Stephan
More information about the gstreamer-devel
mailing list