webrtcbin: add missing warning for caps missmatch
This helps debug cases when the remote is offerer and m-line does not match with already existing transceivers. In this case, it will create new ones with sendrecv direction without any warning. Similar with code from _create_answer_task Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8735>
This commit is contained in:
parent
883ff6caaa
commit
0017384ae2
@ -6518,19 +6518,27 @@ _create_and_associate_transceivers_from_sdp (GstWebRTCBin * webrtc,
|
|||||||
if (trans_caps) {
|
if (trans_caps) {
|
||||||
GstCaps *offer_caps = _rtp_caps_from_media (media);
|
GstCaps *offer_caps = _rtp_caps_from_media (media);
|
||||||
GstCaps *caps = gst_caps_intersect (offer_caps, trans_caps);
|
GstCaps *caps = gst_caps_intersect (offer_caps, trans_caps);
|
||||||
gst_caps_unref (offer_caps);
|
|
||||||
gst_caps_unref (trans_caps);
|
|
||||||
if (caps) {
|
if (caps) {
|
||||||
if (!gst_caps_is_empty (caps)) {
|
if (!gst_caps_is_empty (caps)) {
|
||||||
GST_LOG_OBJECT (webrtc,
|
GST_LOG_OBJECT (webrtc,
|
||||||
"found compatible transceiver %" GST_PTR_FORMAT
|
"found compatible transceiver %" GST_PTR_FORMAT
|
||||||
" for offer media %u", trans, i);
|
" for offer media %u", trans, i);
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
gst_caps_unref (offer_caps);
|
||||||
|
gst_caps_unref (trans_caps);
|
||||||
break;
|
break;
|
||||||
|
} else {
|
||||||
|
GST_LOG_OBJECT (webrtc,
|
||||||
|
"tried but failed to intersect caps from"
|
||||||
|
" offer for m-line %d (%" GST_PTR_FORMAT
|
||||||
|
") with caps from codec preferences and transceiver %"
|
||||||
|
GST_PTR_FORMAT, i, offer_caps, trans_caps);
|
||||||
}
|
}
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
caps = NULL;
|
caps = NULL;
|
||||||
}
|
}
|
||||||
|
gst_caps_unref (offer_caps);
|
||||||
|
gst_caps_unref (trans_caps);
|
||||||
}
|
}
|
||||||
trans = NULL;
|
trans = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user