diff options
author | Matthew Waters <matthew@centricular.com> | 2021-05-06 17:07:51 +1000 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-05-06 12:19:51 +0000 |
commit | a78c907597a62b325dcc9cadc9dc34be4db839f1 (patch) | |
tree | 41c0a70b145b313d6b141cddc4bfa0cf913a4f38 /ext/webrtc/gstwebrtcbin.c | |
parent | 1470660976b4450f36ad151f6416f93e8a584623 (diff) | |
download | gstreamer-plugins-bad-a78c907597a62b325dcc9cadc9dc34be4db839f1.tar.gz |
webrtc: only add nack pli by default if kind is video
Sending/receiving PLI's (Picture Loss Indication) for non-video doesn't
really make sense. This also matches what the browsers do.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2220>
Diffstat (limited to 'ext/webrtc/gstwebrtcbin.c')
-rw-r--r-- | ext/webrtc/gstwebrtcbin.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/webrtc/gstwebrtcbin.c b/ext/webrtc/gstwebrtcbin.c index 9bf156f13..dc4b0033a 100644 --- a/ext/webrtc/gstwebrtcbin.c +++ b/ext/webrtc/gstwebrtcbin.c @@ -1573,6 +1573,7 @@ static GstCaps * _add_supported_attributes_to_caps (GstWebRTCBin * webrtc, WebRTCTransceiver * trans, const GstCaps * caps) { + GstWebRTCKind kind; GstCaps *ret; guint i; @@ -1581,6 +1582,7 @@ _add_supported_attributes_to_caps (GstWebRTCBin * webrtc, ret = gst_caps_make_writable (caps); + kind = webrtc_kind_from_caps (ret); for (i = 0; i < gst_caps_get_size (ret); i++) { GstStructure *s = gst_caps_get_structure (ret, i); @@ -1588,7 +1590,8 @@ _add_supported_attributes_to_caps (GstWebRTCBin * webrtc, if (!gst_structure_has_field (s, "rtcp-fb-nack")) gst_structure_set (s, "rtcp-fb-nack", G_TYPE_BOOLEAN, TRUE, NULL); - if (!gst_structure_has_field (s, "rtcp-fb-nack-pli")) + if (kind == GST_WEBRTC_KIND_VIDEO + && !gst_structure_has_field (s, "rtcp-fb-nack-pli")) gst_structure_set (s, "rtcp-fb-nack-pli", G_TYPE_BOOLEAN, TRUE, NULL); if (!gst_structure_has_field (s, "rtcp-fb-transport-cc")) gst_structure_set (s, "rtcp-fb-transport-cc", G_TYPE_BOOLEAN, TRUE, NULL); |