From 3f0f41f79fb51a942c9d23c1a1c346d8783da383 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Mon, 14 Jul 2014 16:47:45 +0200 Subject: [PATCH] composition: Remove the reset children method as it is all already done in _empty_bin () Co-Authored by: Thibault Saunier --- gnl/gnlcomposition.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index 5bca789..6c294ab 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -844,42 +844,6 @@ signal_duration_change (GnlComposition * comp) } static gboolean -reset_child (GValue * item, GValue * ret G_GNUC_UNUSED, gpointer user_data) -{ - GnlObject *object = g_value_get_object (item); - GstPad *srcpad, *peerpad; - - GST_DEBUG_OBJECT (object, "unlocking state"); - gst_element_set_locked_state (GST_ELEMENT (object), FALSE); - - srcpad = object->srcpad; - peerpad = gst_pad_get_peer (srcpad); - if (peerpad) { - gst_pad_unlink (srcpad, peerpad); - gst_object_unref (peerpad); - } - - return TRUE; -} - -static void -reset_children (GnlComposition * comp) -{ - GstIterator *children; - - children = gst_bin_iterate_elements (GST_BIN (comp->priv->current_bin)); - -retry: - if (G_UNLIKELY (gst_iterator_fold (children, - (GstIteratorFoldFunction) reset_child, NULL, - comp) == GST_ITERATOR_RESYNC)) { - gst_iterator_resync (children); - goto retry; - } - gst_iterator_free (children); -} - -static gboolean _remove_child (GValue * item, GValue * ret G_GNUC_UNUSED, GstBin * bin) { GstElement *child = g_value_get_object (item); @@ -929,8 +893,6 @@ gnl_composition_reset (GnlComposition * comp) gnl_composition_reset_target_pad (comp); - reset_children (comp); - priv->initialized = FALSE; priv->send_stream_start = TRUE; priv->real_eos_seqnum = 0; -- 2.7.4