From: Sangchul Lee Date: Thu, 10 Mar 2022 10:22:52 +0000 (+0900) Subject: webrtcbin: Check data channel transport for notifying 'ice-gathering-state' X-Git-Tag: submit/tizen/20220406.053411~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9bdfcbc9d15fe1f5cf060dd0e744344e1cc1bf38;p=platform%2Fupstream%2Fgstreamer.git webrtcbin: Check data channel transport for notifying 'ice-gathering-state' Previously, it did not care about data channel's. It is fixed by adding some conditions. Change-Id: Ie388e25f40a43dcbd39ec2c477022f8984f04e98 Part-of: --- diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c index 72627fc..d22827c 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c @@ -1112,15 +1112,11 @@ _collate_ice_gathering_states (GstWebRTCBin * webrtc) { #define STATE(val) GST_WEBRTC_ICE_GATHERING_STATE_ ## val GstWebRTCICEGatheringState any_state = 0; -#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION GstWebRTCICEGatheringState ice_state; GstWebRTCDTLSTransport *dtls_transport; GstWebRTCICETransport *transport; gboolean all_completed = webrtc->priv->transceivers->len > 0 || webrtc->priv->data_channel_transport; -#else - gboolean all_completed = webrtc->priv->transceivers->len > 0; -#endif int i; for (i = 0; i < webrtc->priv->transceivers->len; i++) { @@ -1128,11 +1124,6 @@ _collate_ice_gathering_states (GstWebRTCBin * webrtc) g_ptr_array_index (webrtc->priv->transceivers, i); WebRTCTransceiver *trans = WEBRTC_TRANSCEIVER (rtp_trans); TransportStream *stream = trans->stream; -#ifndef TIZEN_FEATURE_WEBRTC_MODIFICATION - GstWebRTCDTLSTransport *dtls_transport; - GstWebRTCICETransport *transport; - GstWebRTCICEGatheringState ice_state; -#endif if (rtp_trans->stopped || stream == NULL) { GST_TRACE_OBJECT (webrtc, "transceiver %p stopped or unassociated", @@ -1163,7 +1154,6 @@ _collate_ice_gathering_states (GstWebRTCBin * webrtc) all_completed = FALSE; } -#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION /* check data channel transport gathering state */ if (all_completed && webrtc->priv->data_channel_transport) { if ((dtls_transport = webrtc->priv->data_channel_transport->transport)) { @@ -1177,7 +1167,7 @@ _collate_ice_gathering_states (GstWebRTCBin * webrtc) all_completed = FALSE; } } -#endif + GST_TRACE_OBJECT (webrtc, "ICE gathering state: 0x%x", any_state); /* Any of the RTCIceTransport s are in the gathering state. */