#undef STATE
}
+#ifdef __TIZEN__
+static void
+_update_and_notify_ice_gathering_state (GstWebRTCBin * webrtc, GstWebRTCICEGatheringState state)
+{
+ GstWebRTCICEGatheringState old_state = webrtc->ice_gathering_state;
+
+ if (state != webrtc->ice_gathering_state) {
+ gchar *old_s, *new_s;
+
+ old_s = _enum_value_to_string (GST_TYPE_WEBRTC_ICE_GATHERING_STATE,
+ old_state);
+ new_s = _enum_value_to_string (GST_TYPE_WEBRTC_ICE_GATHERING_STATE,
+ state);
+ GST_INFO_OBJECT (webrtc, "ICE gathering state change from %s(%u) to %s(%u)",
+ old_s, old_state, new_s, state);
+ g_free (old_s);
+ g_free (new_s);
+
+ webrtc->ice_gathering_state = state;
+ PC_UNLOCK (webrtc);
+ g_object_notify (G_OBJECT (webrtc), "ice-gathering-state");
+ PC_LOCK (webrtc);
+ }
+}
+#endif
+
static void
_update_ice_gathering_state_task (GstWebRTCBin * webrtc, gpointer data)
{
ICE_LOCK (webrtc);
if (webrtc->priv->pending_local_ice_candidates->len != 0) {
/* ICE candidates queued for emissiong -> we're gathering, not complete */
+#ifdef __TIZEN__
+ webrtc->pending_ice_gathering_state = GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE;
+ GST_INFO_OBJECT (webrtc, "set pending_ice_gathering_state to (%u)",
+ webrtc->pending_ice_gathering_state);
+ ICE_UNLOCK (webrtc);
+ return;
+ }
+#else
new_state = GST_WEBRTC_ICE_GATHERING_STATE_GATHERING;
}
+#endif
ICE_UNLOCK (webrtc);
}
+#ifdef __TIZEN__
+ _update_and_notify_ice_gathering_state (webrtc, new_state);
+#else
if (new_state != webrtc->ice_gathering_state) {
gchar *old_s, *new_s;
g_object_notify (G_OBJECT (webrtc), "ice-gathering-state");
PC_LOCK (webrtc);
}
+#endif
}
static void
}
g_array_free (items, TRUE);
+#ifdef __TIZEN__
+ if (webrtc->pending_ice_gathering_state == GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE) {
+ _update_and_notify_ice_gathering_state (webrtc, GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE);
+ webrtc->pending_ice_gathering_state = GST_WEBRTC_ICE_GATHERING_STATE_NEW;
+ }
+#endif
}
static void