From 73274d839137fe0108ac8d4e5c1ffc059a6c9b32 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Mon, 14 Jul 2014 16:41:25 +0200 Subject: [PATCH] composition: No need to children state locked anymore Co-Authored by: Thibault Saunier --- gnl/gnlcomposition.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index d94a518..bd27ef7 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -216,8 +216,6 @@ static void _relink_single_node (GnlComposition * comp, GNode * node, GstEvent * toplevel_seek); static gboolean _update_pipeline_func (GnlComposition * comp); static gboolean _commit_func (GnlComposition * comp); -static gboolean lock_child_state (GValue * item, GValue * ret, - gpointer udata G_GNUC_UNUSED); static gboolean set_child_caps (GValue * item, GValue * ret G_GNUC_UNUSED, GnlObject * comp); static GstEvent *get_new_seek_event (GnlComposition * comp, gboolean initial, @@ -866,18 +864,6 @@ reset_child (GValue * item, GValue * ret G_GNUC_UNUSED, gpointer user_data) return TRUE; } -static gboolean -lock_child_state (GValue * item, GValue * ret G_GNUC_UNUSED, - gpointer udata G_GNUC_UNUSED) -{ - GstElement *child = g_value_get_object (item); - - GST_DEBUG_OBJECT (child, "locking state"); - gst_element_set_locked_state (child, TRUE); - - return TRUE; -} - static void reset_children (GnlComposition * comp) { @@ -2187,15 +2173,6 @@ gnl_composition_change_state (GstElement * element, GstStateChange transition) GST_DEBUG_OBJECT (comp, "Setting all children to READY and locking their state"); - children = gst_bin_iterate_elements (GST_BIN (comp->priv->current_bin)); - - while (G_UNLIKELY (gst_iterator_fold (children, - (GstIteratorFoldFunction) lock_child_state, NULL, - NULL) == GST_ITERATOR_RESYNC)) { - gst_iterator_resync (children); - } - gst_iterator_free (children); - /* Set caps on all objects */ if (G_UNLIKELY (!gst_caps_is_any (GNL_OBJECT (comp)->caps))) { children = gst_bin_iterate_elements (GST_BIN (comp->priv->current_bin)); -- 2.7.4