set PENDING on bin correctly for special case. fixes testsuite again.
authorThomas Vander Stichele <thomas@apestaart.org>
Mon, 12 Jul 2004 10:03:04 +0000 (10:03 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Mon, 12 Jul 2004 10:03:04 +0000 (10:03 +0000)
Original commit message from CVS:
set PENDING on bin correctly for special case. fixes testsuite again.

ChangeLog
gst/gstelement.c
gst/schedulers/gstoptimalscheduler.c
tests/old/testsuite/states/parent.c
testsuite/states/parent.c

index 9600d3c..cc1c649 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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:
 
        * 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:
           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:
index 02ef133..e32a84b 100644 (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);
 
index 8d296e2..ba72309 100644 (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 */
index 7994339..aa583c5 100644 (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);
 
index 7994339..aa583c5 100644 (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);