webrtcbin: Refactor codec preference retrieval
authorOlivier Crête <olivier.crete@collabora.com>
Wed, 5 May 2021 23:00:11 +0000 (19:00 -0400)
committerOlivier Crête <olivier.crete@collabora.com>
Thu, 13 May 2021 19:05:00 +0000 (15:05 -0400)
commitf6345b4b0324e2b8ccb545022ae38a8aab2647f3
tree7cf3c5b0b3be82d015379d310ef188440b12e722
parent48f4498801595ea5d2e3fac4fa4e29521461ff0c
webrtcbin: Refactor codec preference retrieval

Now intersect against pads on both sides if they are available.
If the intersection fails, we now just reject the creation of the offer
or answer as it means that the codec_preferences are too restrictive or
that the caps on both sides the webrtcbin are not compatible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
ext/webrtc/gstwebrtcbin.c
ext/webrtc/utils.h