set PENDING on bin correctly for special case. fixes testsuite again.

Original commit message from CVS:
set PENDING on bin correctly for special case. fixes testsuite again.
This commit is contained in:
Thomas Vander Stichele 2004-07-12 10:03:04 +00:00
parent 9b9a151d43
commit 14e4ff51de
5 changed files with 21 additions and 7 deletions

View file

@ -1,3 +1,15 @@
2004-07-12 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/gstelement.c: (gst_element_set_state),
(gst_element_change_state):
d'oh. Set PENDING state correctly before forcing bin to change.
* gst/gststructure.c: (gst_structure_value_get_generic_type),
(gst_structure_parse_fixed_list):
* gst/schedulers/gstoptimalscheduler.c:
(gst_opt_scheduler_state_transition):
* testsuite/states/parent.c: (main):
remove comment now that it's fixed.
2004-07-11 Benjamin Otte <otte@gnome.org>
* gst/gstclock.h:
@ -680,7 +692,6 @@
* autogen.sh: Add a temporary 'env' to test buildbot problems.
>>>>>>> 1.652
2004-06-04 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
* configure.ac:
@ -1952,7 +1963,6 @@
add .po file download snippet
fix a bug in the doc makefile
>>>>>>> 1.566
2004-04-20 Thomas Vander Stichele <thomas at apestaart dot org>
* Makefile.am:

View file

@ -2730,7 +2730,7 @@ gst_element_set_state (GstElement * element, GstElementState state)
/* for bins, we allow calls to change_state where old == new
* for elements, too many of them break with g_assert_not_reached(),
* so weed those out first. This is done in gst-plugins CVS and can
* be fixed here after a new plugins reelase.
* be fixed here after a new plugins release.
* FIXME: of course this file should not have ties to gstbin.h *at all*,
* but someone else added a function at the bottom using it.
* Fix this properly for 0.9 */
@ -2741,6 +2741,12 @@ gst_element_set_state (GstElement * element, GstElementState state)
if (state == curpending) {
if (GST_IS_BIN (element)) {
/* set current state on it again */
GST_STATE_PENDING (element) = curpending;
GST_CAT_INFO_OBJECT (GST_CAT_STATES, element,
"%s is a bin, calling class state change on it for %s -> %s",
GST_OBJECT_NAME (element),
gst_element_state_get_name (curpending),
gst_element_state_get_name (state));
if (oclass->change_state)
return_val = (oclass->change_state) (element);
return return_val;
@ -2945,7 +2951,7 @@ gst_element_change_state (GstElement * element)
}
GST_CAT_LOG_OBJECT (GST_CAT_STATES, element,
"default handler tries setting state from %s to %s %04x",
"default handler tries setting state from %s to %s (%04x)",
gst_element_state_get_name (old_state),
gst_element_state_get_name (old_pending), old_transition);

View file

@ -1480,7 +1480,7 @@ gst_opt_scheduler_state_transition (GstScheduler * sched, GstElement * element,
GstOptSchedulerGroup *group;
GstElementStateReturn res = GST_STATE_SUCCESS;
GST_DEBUG ("element \"%s\" state change %d", GST_ELEMENT_NAME (element),
GST_DEBUG ("element \"%s\" state change (%04x)", GST_ELEMENT_NAME (element),
transition);
/* we check the state of the managing pipeline here */

View file

@ -99,7 +99,6 @@ main (gint argc, gchar * argv[])
g_assert (GST_STATE (bin1) == GST_STATE_PAUSED);
g_assert (GST_STATE (bin2) == GST_STATE_PAUSED);
g_assert (GST_STATE (fakesrc) == GST_STATE_PAUSED);
//FIXME: fix core so that this assert works
g_assert (GST_STATE (identity) == GST_STATE_PAUSED);
g_assert (GST_STATE (fakesink) == GST_STATE_PAUSED);

View file

@ -99,7 +99,6 @@ main (gint argc, gchar * argv[])
g_assert (GST_STATE (bin1) == GST_STATE_PAUSED);
g_assert (GST_STATE (bin2) == GST_STATE_PAUSED);
g_assert (GST_STATE (fakesrc) == GST_STATE_PAUSED);
//FIXME: fix core so that this assert works
g_assert (GST_STATE (identity) == GST_STATE_PAUSED);
g_assert (GST_STATE (fakesink) == GST_STATE_PAUSED);