From: Sangchul Lee Date: Tue, 28 Jun 2022 08:14:13 +0000 (+0900) Subject: Revert "webrtcdatachannel: Emit 'on-close' signal when calling 'close' action signal" X-Git-Tag: accepted/tizen/unified/20220708.132924~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F276949%2F1;p=platform%2Fupstream%2Fgstreamer.git Revert "webrtcdatachannel: Emit 'on-close' signal when calling 'close' action signal" This reverts commit a6cf067742c1206c073b5e0fe26386a09fda8769. This patch fixed the issue that only occurred between gst to web API(chromium). But it ignores a procedure of closing data channel specified in spec. So, it is reverted. Change-Id: I69d057af4d22a02a1d25cae358df43d5dc588df3 --- diff --git a/subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.c b/subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.c index ffe8a8b..033ad47 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.c @@ -284,32 +284,24 @@ static void _transport_closed (WebRTCDataChannel * channel) { GError *error; -#ifndef TIZEN_FEATURE_WEBRTC_MODIFICATION gboolean both_sides_closed; -#endif GST_WEBRTC_DATA_CHANNEL_LOCK (channel); error = channel->stored_error; channel->stored_error = NULL; -#ifndef TIZEN_FEATURE_WEBRTC_MODIFICATION both_sides_closed = channel->peer_closed && channel->parent.buffered_amount <= 0; if (both_sides_closed || error) { channel->peer_closed = FALSE; } -#endif GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel); if (error) { gst_webrtc_data_channel_on_error (GST_WEBRTC_DATA_CHANNEL (channel), error); g_clear_error (&error); } -#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION - if (channel->parent.buffered_amount <= 0 || error) { -#else if (both_sides_closed || error) { -#endif gst_webrtc_data_channel_on_close (GST_WEBRTC_DATA_CHANNEL (channel)); } } @@ -378,12 +370,10 @@ _on_sctp_stream_reset (WebRTCSCTPTransport * sctp, guint stream_id, "Received channel close for SCTP stream %i label \"%s\"", channel->parent.id, channel->parent.label); -#ifndef TIZEN_FEATURE_WEBRTC_MODIFICATION GST_WEBRTC_DATA_CHANNEL_LOCK (channel); channel->peer_closed = TRUE; GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel); -#endif _channel_enqueue_task (channel, (ChannelTask) _close_procedure, GUINT_TO_POINTER (stream_id), NULL); } diff --git a/subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.h b/subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.h index 13e01da..a0b38a7 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.h +++ b/subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.h @@ -53,9 +53,7 @@ struct _WebRTCDataChannel gboolean opened; gulong src_probe; GError *stored_error; -#ifndef TIZEN_FEATURE_WEBRTC_MODIFICATION gboolean peer_closed; -#endif gpointer _padding[GST_PADDING]; };