Pipeline freezes when switching on input selector

ladyluck luckyladyluck420 at gmail.com
Thu Jan 24 00:29:32 UTC 2019


Hello, I am having an issue with the input-selector element. I have
successfully created a test pipeline with a testvideosrc and a webrtcbin
source connected to an input selector and playing through the autovideosink.


videotestsource                         ->     input-selector \
                                                                                        
->autovideosink
webrtcbin -> decodebin -> queue -> inputselector /


The next step was now, instead of using the autovideosink, using a filesink
to save the output to a file


videotestsource    ->        x264enc                     ->  input-selector
\
                                                                                                                
-> matroskamux -> filesink 
webrtcbin -> decodebin -> queue -> x264enc -> inputselector /

However, when the input selector is switched to the webrtc source, the
pipeline freezes and the file is no longer being written to. From what I can
see the pipeline is exactly the same in both pipes except for the filesink
and the autovideo sink, so why would the pipeline freeze?

I am using these commands to switch the input on the input-selector:
            new_pad = self.video_switch.get_static_pad('sink_1')
            self.video_switch.set_property('active-pad', new_pad)


Here is some additional information about the application I am trying to
write and maybe my approach is incorrect and I should be trying something
else, but I just don't know what yet. 

So the idea is that when the pipeline is started, the testvideosrc is
initialized to a black screen. When a user connects over webrtc, their
camera will be switched to and when they are disconnected the videotestsrc
will be playing again. Many users will be connected and disconnected to the
pipeline, so many webrtc elements will be initialized  (but no more than one
at a time) and linked/unlinked to the pipeline when they are connected and
disconnected and the pipeline should ideally never halt. I have read about
an 'interpipesink' element, in this case I would initialize a new pipeline
for every webrtc connection and connect this to the filesink. But should I
handle all of this in a single pipeline, or does it make sense to have
multiple pipelines for the webrtc connections? Finally, any more information
on how to debug this problem would be appreciated, I have spent several
hours trying to link various different elements in my pipeline, but none
seem to have worked, but I do not know much about getting a debug output
from gstreamer





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list