}
}
+static void __release_all_remaining_transceivers(webrtc_s *webrtc)
+{
+ GArray *trans_array;
+ int i;
+
+ ASSERT(webrtc);
+
+ g_signal_emit_by_name(webrtc->gst.webrtcbin, "get-transceivers", &trans_array, NULL);
+ for (i = 0; i < (int)trans_array->len; i++) {
+ GstWebRTCRTPTransceiver *trans = g_array_index(trans_array, GstWebRTCRTPTransceiver*, i);
+ LOG_DEBUG("unreferencing transceiver[%p]", trans);
+ gst_object_unref(trans); /* unreferencing it due to the increased referencing value by calling get-transceivers() */
+ gst_object_unref(trans); /* unreferencing it once again to demand to release this object */
+ }
+ g_array_unref(trans_array);
+}
+
void _gst_destroy_pipeline(webrtc_s *webrtc)
{
RET_IF(webrtc == NULL, "webrtc is NULL");
g_hash_table_destroy(webrtc->sources);
webrtc->sources = NULL;
}
+
+ __release_all_remaining_transceivers(webrtc);
+
if (webrtc->gst.bus_watcher > 0) {
gst_bus_remove_watch(webrtc->gst.bus);
webrtc->gst.bus_watcher = 0;