best way to handle inactive sinks with eg. compositor
Marianna Smidth Buschle
msb at qtec.com
Thu Sep 30 07:56:52 UTC 2021
Try looking at the parameters from the underlying Aggregator (base class
of Compositor).
I have some years ago made my own class based on the Aggregator and
"borrowing" some of the functionality of the Compositor in order to
aggregate metadata from one branch of my pipeline (where some processing
had occurred) to the original stream. In my case I wanted to make sure I
only produced data if I had frames on both pads and the timestamps matched.
So I recall having to play with the settings in order to achieve that,
because in some cases it could produce black frames if nothing was
available.
Maybe 'start-time-selection'.
If nothing helps you can consider doing dynamic linking: wait for data
to arrive at the second tcpclientsrc before connecting it to the compositor.
Use a signal if it has one, otherwise a buffer probe should also work.
On 19.09.2021 14.00, gstreamer-devel-request at lists.freedesktop.org wrote:
> If one is working with multiple video streams of which you do not know up front if they are running/available. What would be the adviced method of handling these?
>
> Eg. if the 2nd tcpclientsrc is not running the whole pipe is stuck at ' Pipeline is PREROLLING ... '
>
> gst-launch-1.0 \
> compositor name=c sink_1::xpos=0 sink_2::xpos=320 sink_3::ypos=240 sink_4::xpos=320 sink_4::ypos=240 \
> ! x264enc ! mpegtsmux name=mux ! srtsink uri=srt://:33333 \
> videotestsrc pattern=blue ! video/x-raw, format=I420, framerate=5/1, width=640, height=480 ! c. \
> tcpclientsrc port=40001 ! queue ! tsdemux ! video/x-h264 ! h264parse ! avdec_h264 ! video/x-raw ! c.sink_1 \
> tcpclientsrc port=40002 ! queue ! tsdemux ! video/x-h264 ! h264parse ! avdec_h264 ! video/x-raw ! c.sink_2 \
> videotestsrc ! c.sink_3 \
> videotestsrc ! c.sink_4
--
Best regards / Med venlig hilsen
“Marianna Smidth Buschle”
More information about the gstreamer-devel
mailing list