best way to handle inactive sinks with eg. compositor

Nicolas Dufresne nicolas at ndufresne.ca
Thu Sep 30 12:47:04 UTC 2021


Le jeudi 30 septembre 2021 à 09:56 +0200, Marianna Smidth Buschle via gstreamer-
devel a écrit :
> Try looking at the parameters from the underlying Aggregator (base class 
> of Compositor).

I believe the best way will be this (needs someone to review and test I
suppose):

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/867

> 
> 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
> 




More information about the gstreamer-devel mailing list