channel);
} else if (ready_state == GST_WEBRTC_DATA_CHANNEL_STATE_CLOSED) {
gboolean found;
-#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION
- int i;
-#endif
DC_LOCK (webrtc);
#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION
- for (i = 0; i < webrtc->priv->data_channels->len; i++)
- if (g_ptr_array_index (webrtc->priv->data_channels, i) == channel)
+ if (channel->parent.prev_ready_state == GST_WEBRTC_DATA_CHANNEL_STATE_OPEN ||
+ channel->parent.prev_ready_state == GST_WEBRTC_DATA_CHANNEL_STATE_CLOSING)
webrtc->priv->data_channels_closed++;
#endif
_channel_enqueue_task (channel, (ChannelTask) _transport_closed, NULL,
NULL);
} else if (channel->parent.ready_state == GST_WEBRTC_DATA_CHANNEL_STATE_OPEN) {
+#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION
+ channel->parent.prev_ready_state = channel->parent.ready_state;
+#endif
channel->parent.ready_state = GST_WEBRTC_DATA_CHANNEL_STATE_CLOSING;
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
g_object_notify (G_OBJECT (channel), "ready-state");
}
if (channel->ready_state != GST_WEBRTC_DATA_CHANNEL_STATE_OPEN) {
+#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION
+ channel->prev_ready_state = channel->ready_state;
+#endif
channel->ready_state = GST_WEBRTC_DATA_CHANNEL_STATE_OPEN;
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
g_object_notify (G_OBJECT (channel), "ready-state");
return;
}
+#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION
+ channel->prev_ready_state = channel->ready_state;
+#endif
channel->ready_state = GST_WEBRTC_DATA_CHANNEL_STATE_CLOSED;
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
gint id;
GstWebRTCPriorityType priority;
GstWebRTCDataChannelState ready_state;
+#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION
+ GstWebRTCDataChannelState prev_ready_state;
+#endif
guint64 buffered_amount;
guint64 buffered_amount_low_threshold;