return;
}
+static void
+__mmplayer_delete_signal_connection(mmplayer_t *player, GstElement *removed_element)
+{
+ MMPLAYER_FENTER();
+
+ MMPLAYER_RETURN_IF_FAIL(player);
+ MMPLAYER_RETURN_IF_FAIL(removed_element);
+
+ LOGD("delete signal on %s", GST_ELEMENT_NAME(removed_element));
+
+ for (int type = MM_PLAYER_SIGNAL_TYPE_AUTOPLUG; type < MM_PLAYER_SIGNAL_TYPE_ALL; type++) {
+ GList *node = player->signals[type];
+ while (node) {
+ GList *next_node = node->next;
+ mmplayer_signal_item_t *item = node->data;
+ if (item && item->obj == G_OBJECT(removed_element)) {
+ player->signals[type] = g_list_delete_link(player->signals[type], node);
+ MMPLAYER_FREEIF(item);
+ }
+ node = next_node;
+ }
+ }
+
+ MMPLAYER_FLEAVE();
+}
+
void
__mmplayer_gst_deep_element_removed(GstElement *bin, GstBin *child, GstElement *element, gpointer data)
{
+ mmplayer_t *player = (mmplayer_t *)data;
+
+ MMPLAYER_FENTER();
+
+ MMPLAYER_RETURN_IF_FAIL(player);
+
LOGD("%s > %s > %s", GST_ELEMENT_NAME(bin), GST_ELEMENT_NAME(child), GST_ELEMENT_NAME(element));
- return;
+
+ __mmplayer_delete_signal_connection(player, element);
+
+ MMPLAYER_FLEAVE();
}
static GstElement *