From 5511124bc011edc7f5a30d40ea7d1530bb9bd49e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 17 Nov 2016 09:40:38 +0200 Subject: [PATCH] Revert "nlecomposition: Start task and initialize the stack after chaining up to parent's change state function" This reverts commit 57d40bec1a3c5048baaad08403d7b7e641a9c55c. Apparently it causes timeouts in the unit tests on Jenkins and Thibault's machine, and in the gst-validate tests. Caused by elements staying in PAUSED and waiting to be set to PLAYING. Needs further investigation. --- plugins/nle/nlecomposition.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/plugins/nle/nlecomposition.c b/plugins/nle/nlecomposition.c index 46c52e8..67027b9 100644 --- a/plugins/nle/nlecomposition.c +++ b/plugins/nle/nlecomposition.c @@ -2397,13 +2397,23 @@ static GstStateChangeReturn nle_composition_change_state (GstElement * element, GstStateChange transition) { NleComposition *comp = (NleComposition *) element; - GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; GST_DEBUG_OBJECT (comp, "%s => %s", gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)), gst_element_state_get_name (GST_STATE_TRANSITION_NEXT (transition))); switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + _start_task (comp); + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + /* state-lock all elements */ + GST_DEBUG_OBJECT (comp, + "Setting all children to READY and locking their state"); + + _add_update_compo_action (comp, G_CALLBACK (_initialize_stack_func), + COMP_UPDATE_STACK_INITIALIZE); + break; case GST_STATE_CHANGE_PAUSED_TO_READY: _stop_task (comp); @@ -2425,27 +2435,7 @@ nle_composition_change_state (GstElement * element, GstStateChange transition) break; } - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); - if (ret == GST_STATE_CHANGE_FAILURE) - return ret; - - switch (transition) { - case GST_STATE_CHANGE_NULL_TO_READY: - _start_task (comp); - break; - case GST_STATE_CHANGE_READY_TO_PAUSED: - /* state-lock all elements */ - GST_DEBUG_OBJECT (comp, - "Setting all children to READY and locking their state"); - - _add_update_compo_action (comp, G_CALLBACK (_initialize_stack_func), - COMP_UPDATE_STACK_INITIALIZE); - break; - default: - break; - } - - return ret; + return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); } static gint -- 2.7.4