webrtcbin: ensure RTX entry for all formats
Properly implement RFC 4588 by ensuring each media format has its own RTX payload type with unique 'apt' parameter, rather than only mapping the first format. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8663>
This commit is contained in:
parent
3ac5bb2d36
commit
36c983ccd5
@ -3065,11 +3065,9 @@ _pick_rtx_payload_types (GstWebRTCBin * webrtc, WebRTCTransceiver * trans,
|
|||||||
{
|
{
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
|
||||||
if (trans->local_rtx_ssrc_map)
|
if (!trans->local_rtx_ssrc_map)
|
||||||
gst_structure_free (trans->local_rtx_ssrc_map);
|
trans->local_rtx_ssrc_map =
|
||||||
|
gst_structure_new_empty ("application/x-rtp-ssrc-map");
|
||||||
trans->local_rtx_ssrc_map =
|
|
||||||
gst_structure_new_empty ("application/x-rtp-ssrc-map");
|
|
||||||
|
|
||||||
if (trans->do_nack) {
|
if (trans->do_nack) {
|
||||||
struct media_payload_map_item *item;
|
struct media_payload_map_item *item;
|
||||||
@ -3640,8 +3638,9 @@ sdp_media_from_transceiver (GstWebRTCBin * webrtc, GstSDPMedia * media,
|
|||||||
|
|
||||||
gst_clear_structure (&extmap);
|
gst_clear_structure (&extmap);
|
||||||
|
|
||||||
{
|
// create rtx entry for each format type
|
||||||
const GstStructure *s = gst_caps_get_structure (caps, 0);
|
for (i = 0; i < gst_caps_get_size (caps); i++) {
|
||||||
|
const GstStructure *s = gst_caps_get_structure (caps, i);
|
||||||
gint clockrate = -1;
|
gint clockrate = -1;
|
||||||
gint rtx_target_pt;
|
gint rtx_target_pt;
|
||||||
guint rtx_target_ssrc = -1;
|
guint rtx_target_ssrc = -1;
|
||||||
|
@ -6510,7 +6510,8 @@ GST_START_TEST (test_video_rtx_no_duplicate_payloads)
|
|||||||
|
|
||||||
VAL_SDP_INIT (no_duplicate_payloads, on_sdp_media_no_duplicate_payloads,
|
VAL_SDP_INIT (no_duplicate_payloads, on_sdp_media_no_duplicate_payloads,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
guint media_format_count[] = { 3 };
|
// two formats for VP8 and H264 and two for VP8-RTX + H264-RTX
|
||||||
|
guint media_format_count[] = { 4 };
|
||||||
VAL_SDP_INIT (media_formats, on_sdp_media_count_formats,
|
VAL_SDP_INIT (media_formats, on_sdp_media_count_formats,
|
||||||
media_format_count, &no_duplicate_payloads);
|
media_format_count, &no_duplicate_payloads);
|
||||||
VAL_SDP_INIT (count, _count_num_sdp_media, GUINT_TO_POINTER (1),
|
VAL_SDP_INIT (count, _count_num_sdp_media, GUINT_TO_POINTER (1),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user