webrtc_sendrecv.py: Link pads instead of elements
authorNirbheek Chauhan <nirbheek@centricular.com>
Wed, 23 Mar 2022 09:59:55 +0000 (15:29 +0530)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 23 Mar 2022 21:04:39 +0000 (21:04 +0000)
commit4ae903d383a19ad65c5ee281b0495ffd577aadf9
tree8209794b2f78c5b7f30f3211b043bce946577836
parent1403e7419624e7cf87e60751497cf3e836d64f14
webrtc_sendrecv.py: Link pads instead of elements

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>
subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py