webrtcbin: reuese the same fec/rtx/red payload types for the same media payload
authorMatthew Waters <matthew@centricular.com>
Tue, 24 May 2022 04:36:36 +0000 (14:36 +1000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 24 May 2022 10:21:11 +0000 (10:21 +0000)
commitbe2dfd0c3665f1d4205472c684dd7dabb1240965
tree047e008a1939cc226cbe8e3f052e8d238aa9f607
parente64c6f0b93cedd8a7c04711b80d1f0e6a81cdb4f
webrtcbin: reuese the same fec/rtx/red payload types for the same media payload

WHen bundling, if multiple medias are used with the same media payload, then
each of the fec/rtx/red additions would add a distinct payload.  This could
very easily overflow the available payload space.

Instead, track the relationship between the media payload value and
the relevant fec/rtx/red payload values and reuse them whenever
necessary, even when bundling.

e.g.

...
a=group:BUNDLE video0 video1
m=video 9 UDP/SAVPF 96 97
a=mid:video0
a=rtpmap:96 VP8/90000
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
...
m=video 9 UDP/SAVPF 96 97
a=mid:video1
a=rtpmap:96 VP8/90000
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2474>
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c
subprojects/gst-plugins-bad/tests/check/elements/webrtcbin.c