This was not a problem here because even if we end up accidentally
linking to the wrong pad, things will work out eventually as long as
one pad-added is emitted for each pad that is added.
But it will be a huge problem if someone copies this code and changes
something that requires different handling for different sorts of
pads. The resultant code will be racy. Let's not do this, it's a bad
example.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2008>
decodebin.connect('pad-added', self.on_incoming_decodebin_stream)
self.pipe.add(decodebin)
decodebin.sync_state_with_parent()
- self.webrtc.link(decodebin)
+ pad.link(decodebin.get_static_pad('sink'))
def start_pipeline(self, create_offer=True, opus_pt=96, vp8_pt=97):
print_status(f'Creating pipeline, create_offer: {create_offer}')