Skip to content

Commit

Permalink
sdp/caps: support translating transport-cc rtcp-fb from caps to sdp a…
Browse files Browse the repository at this point in the history
  • Loading branch information
ystreet committed Apr 29, 2021
1 parent 7725c90 commit 1ca7474
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gst-libs/gst/sdp/gstsdpmessage.c
Expand Up @@ -3767,7 +3767,7 @@ gst_sdp_media_set_media_from_caps (const GstCaps * caps, GstSDPMedia * media)
gchar *tmp;
gint caps_pt, caps_rate;
guint n_fields, j;
gboolean first, nack, nack_pli, ccm_fir;
gboolean first, nack, nack_pli, ccm_fir, transport_cc;
GString *fmtp;
GstStructure *s;

Expand Down Expand Up @@ -3833,6 +3833,15 @@ gst_sdp_media_set_media_from_caps (const GstCaps * caps, GstSDPMedia * media)
}
}

if (gst_structure_get_boolean (s, "rtcp-fb-transport-cc", &transport_cc)) {
if (transport_cc) {
tmp = g_strdup_printf ("%d transport-cc", caps_pt);
gst_sdp_media_add_attribute (media, "rtcp-fb", tmp);
g_free (tmp);
GST_DEBUG ("adding rtcp-fb-transport-cc to pt=%d", caps_pt);
}
}

/* collect all other properties and add them to fmtp, extmap or attributes */
fmtp = g_string_new ("");
g_string_append_printf (fmtp, "%d ", caps_pt);
Expand Down

0 comments on commit 1ca7474

Please sign in to comment.