The caps in your initial pipelines are not provided by udpsink
, they are there so you can tell the downstream elements what kind of data to expect. Therefore, switchbin
never sees any of the caps directly and can't choose a pipeline.
I think there's two potential solutions:
add a
decodebin
element right afterrtpjitterbuffer
which might be able to decode RTP and content together (you'll have to try, not 100% certain)if the streams have different SSRC, you could use
rtpssrcdemux
to direct the data to the correct pipeline. However, that requires at least a small bit of signal management code and is AFAICT not possible with gst-launch alone.