+2005-09-24 Tim-Philipp Müller <tim at centricular dot net>
+
+ * check/gst/gstbin.c: (test_children_state_change_order_flagged_sink),
+ (test_children_state_change_order_semi_sink):
+ Fix test case: we can't rely on a fixed state change order when
+ going from READY => PAUSED because the sink might commit its
+ new state first when the first buffer created by the source
+ reaches the sink before the source has finished its change state.
+ (Test case still fails at times, see #316856, comment 5 onwards)
+
2005-09-24 Wim Taymans <wim@fluendo.com>
* docs/design/part-events.txt:
* change and change state later when it has a buffer */
ASSERT_STATE_CHANGE_MSG (bus, identity, GST_STATE_READY, GST_STATE_PAUSED,
105);
+#if 0
+ /* From here on, all bets are off. Usually the source changes state next,
+ * but it might just as well be that the first buffer produced by the
+ * source reaches the sink before the source has finished its state change,
+ * in which case the sink will commit its new state before the source ... */
ASSERT_STATE_CHANGE_MSG (bus, src, GST_STATE_READY, GST_STATE_PAUSED, 106);
ASSERT_STATE_CHANGE_MSG (bus, sink, GST_STATE_READY, GST_STATE_PAUSED, 107);
ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_READY, GST_STATE_PAUSED,
ASSERT_STATE_CHANGE_MSG (bus, src, GST_STATE_PAUSED, GST_STATE_PLAYING, 111);
ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_PAUSED, GST_STATE_PLAYING,
112);
+#else
+ pop_messages (bus, 3); /* pop remaining ready => paused messages off the bus */
+ pop_messages (bus, 4); /* pop paused => playing messages off the bus */
+#endif
/* don't set to NULL that will set the bus flushing and kill our messages */
ret = gst_element_set_state (pipeline, GST_STATE_READY);
* change and change state later when it has a buffer */
ASSERT_STATE_CHANGE_MSG (bus, identity, GST_STATE_READY, GST_STATE_PAUSED,
205);
+#if 0
+ /* From here on, all bets are off. Usually the source changes state next,
+ * but it might just as well be that the first buffer produced by the
+ * source reaches the sink before the source has finished its state change,
+ * in which case the sink will commit its new state before the source ... */
ASSERT_STATE_CHANGE_MSG (bus, src, GST_STATE_READY, GST_STATE_PAUSED, 206);
ASSERT_STATE_CHANGE_MSG (bus, sink, GST_STATE_READY, GST_STATE_PAUSED, 207);
ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_READY, GST_STATE_PAUSED,
ASSERT_STATE_CHANGE_MSG (bus, src, GST_STATE_PAUSED, GST_STATE_PLAYING, 211);
ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_PAUSED, GST_STATE_PLAYING,
212);
+#else
+ pop_messages (bus, 3); /* pop remaining ready => paused messages off the bus */
+ pop_messages (bus, 4); /* pop paused => playing messages off the bus */
+#endif
/* don't set to NULL that will set the bus flushing and kill our messages */
ret = gst_element_set_state (pipeline, GST_STATE_READY);
* change and change state later when it has a buffer */
ASSERT_STATE_CHANGE_MSG (bus, identity, GST_STATE_READY, GST_STATE_PAUSED,
105);
+#if 0
+ /* From here on, all bets are off. Usually the source changes state next,
+ * but it might just as well be that the first buffer produced by the
+ * source reaches the sink before the source has finished its state change,
+ * in which case the sink will commit its new state before the source ... */
ASSERT_STATE_CHANGE_MSG (bus, src, GST_STATE_READY, GST_STATE_PAUSED, 106);
ASSERT_STATE_CHANGE_MSG (bus, sink, GST_STATE_READY, GST_STATE_PAUSED, 107);
ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_READY, GST_STATE_PAUSED,
ASSERT_STATE_CHANGE_MSG (bus, src, GST_STATE_PAUSED, GST_STATE_PLAYING, 111);
ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_PAUSED, GST_STATE_PLAYING,
112);
+#else
+ pop_messages (bus, 3); /* pop remaining ready => paused messages off the bus */
+ pop_messages (bus, 4); /* pop paused => playing messages off the bus */
+#endif
/* don't set to NULL that will set the bus flushing and kill our messages */
ret = gst_element_set_state (pipeline, GST_STATE_READY);
* change and change state later when it has a buffer */
ASSERT_STATE_CHANGE_MSG (bus, identity, GST_STATE_READY, GST_STATE_PAUSED,
205);
+#if 0
+ /* From here on, all bets are off. Usually the source changes state next,
+ * but it might just as well be that the first buffer produced by the
+ * source reaches the sink before the source has finished its state change,
+ * in which case the sink will commit its new state before the source ... */
ASSERT_STATE_CHANGE_MSG (bus, src, GST_STATE_READY, GST_STATE_PAUSED, 206);
ASSERT_STATE_CHANGE_MSG (bus, sink, GST_STATE_READY, GST_STATE_PAUSED, 207);
ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_READY, GST_STATE_PAUSED,
ASSERT_STATE_CHANGE_MSG (bus, src, GST_STATE_PAUSED, GST_STATE_PLAYING, 211);
ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_PAUSED, GST_STATE_PLAYING,
212);
+#else
+ pop_messages (bus, 3); /* pop remaining ready => paused messages off the bus */
+ pop_messages (bus, 4); /* pop paused => playing messages off the bus */
+#endif
/* don't set to NULL that will set the bus flushing and kill our messages */
ret = gst_element_set_state (pipeline, GST_STATE_READY);