Previously, peer_closed variable set in _on_sctp_stream_reset() was a condition
to trigger the 'on-close' signal. To emit the 'on-close' signal also when after
calling 'close' action, the condition is removed.
[Version] 1.20.0-15
[Issue Type] Improvement
Change-Id: Ia592f005031490119996ed38ecdada703cf11cc0
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
Name: %{_name}
Version: 1.20.0
Name: %{_name}
Version: 1.20.0
Summary: Streaming-Media Framework Runtime
License: LGPL-2.0+
Group: Multimedia/Framework
Summary: Streaming-Media Framework Runtime
License: LGPL-2.0+
Group: Multimedia/Framework
_transport_closed (WebRTCDataChannel * channel)
{
GError *error;
_transport_closed (WebRTCDataChannel * channel)
{
GError *error;
+#ifndef TIZEN_FEATURE_WEBRTC_MODIFICATION
gboolean both_sides_closed;
gboolean both_sides_closed;
GST_WEBRTC_DATA_CHANNEL_LOCK (channel);
error = channel->stored_error;
channel->stored_error = NULL;
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;
}
both_sides_closed =
channel->peer_closed && channel->parent.buffered_amount <= 0;
if (both_sides_closed || error) {
channel->peer_closed = FALSE;
}
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
if (error) {
gst_webrtc_data_channel_on_error (GST_WEBRTC_DATA_CHANNEL (channel), error);
g_clear_error (&error);
}
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) {
if (both_sides_closed || error) {
gst_webrtc_data_channel_on_close (GST_WEBRTC_DATA_CHANNEL (channel));
}
}
gst_webrtc_data_channel_on_close (GST_WEBRTC_DATA_CHANNEL (channel));
}
}
"Received channel close for SCTP stream %i label \"%s\"",
channel->parent.id, channel->parent.label);
"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);
GST_WEBRTC_DATA_CHANNEL_LOCK (channel);
channel->peer_closed = TRUE;
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
_channel_enqueue_task (channel, (ChannelTask) _close_procedure,
GUINT_TO_POINTER (stream_id), NULL);
}
_channel_enqueue_task (channel, (ChannelTask) _close_procedure,
GUINT_TO_POINTER (stream_id), NULL);
}
gboolean opened;
gulong src_probe;
GError *stored_error;
gboolean opened;
gulong src_probe;
GError *stored_error;
+#ifndef TIZEN_FEATURE_WEBRTC_MODIFICATION
gpointer _padding[GST_PADDING];
};
gpointer _padding[GST_PADDING];
};