composition: Remove the reset children method

as it is all already done in _empty_bin ()

Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
This commit is contained in:
Mathieu Duponchelle 2014-07-14 16:47:45 +02:00 committed by Thibault Saunier
parent 76bf900e82
commit 3f0f41f79f

View file

@ -843,42 +843,6 @@ signal_duration_change (GnlComposition * comp)
gst_message_new_duration_changed (GST_OBJECT_CAST (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)
{
@ -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;