mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
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>
This commit is contained in:
parent
1470660976
commit
a78c907597
2 changed files with 4 additions and 2 deletions
|
@ -1573,6 +1573,7 @@ static GstCaps *
|
||||||
_add_supported_attributes_to_caps (GstWebRTCBin * webrtc,
|
_add_supported_attributes_to_caps (GstWebRTCBin * webrtc,
|
||||||
WebRTCTransceiver * trans, const GstCaps * caps)
|
WebRTCTransceiver * trans, const GstCaps * caps)
|
||||||
{
|
{
|
||||||
|
GstWebRTCKind kind;
|
||||||
GstCaps *ret;
|
GstCaps *ret;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
|
@ -1581,6 +1582,7 @@ _add_supported_attributes_to_caps (GstWebRTCBin * webrtc,
|
||||||
|
|
||||||
ret = gst_caps_make_writable (caps);
|
ret = gst_caps_make_writable (caps);
|
||||||
|
|
||||||
|
kind = webrtc_kind_from_caps (ret);
|
||||||
for (i = 0; i < gst_caps_get_size (ret); i++) {
|
for (i = 0; i < gst_caps_get_size (ret); i++) {
|
||||||
GstStructure *s = gst_caps_get_structure (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"))
|
if (!gst_structure_has_field (s, "rtcp-fb-nack"))
|
||||||
gst_structure_set (s, "rtcp-fb-nack", G_TYPE_BOOLEAN, TRUE, NULL);
|
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);
|
gst_structure_set (s, "rtcp-fb-nack-pli", G_TYPE_BOOLEAN, TRUE, NULL);
|
||||||
if (!gst_structure_has_field (s, "rtcp-fb-transport-cc"))
|
if (!gst_structure_has_field (s, "rtcp-fb-transport-cc"))
|
||||||
gst_structure_set (s, "rtcp-fb-transport-cc", G_TYPE_BOOLEAN, TRUE, NULL);
|
gst_structure_set (s, "rtcp-fb-transport-cc", G_TYPE_BOOLEAN, TRUE, NULL);
|
||||||
|
|
|
@ -229,4 +229,3 @@ webrtc_kind_from_caps (const GstCaps * caps)
|
||||||
|
|
||||||
return GST_WEBRTC_KIND_UNKNOWN;
|
return GST_WEBRTC_KIND_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue