2008-05-27 Stefan Kost <ensonic@users.sf.net>
* tests/check/gst/gstpipeline.c:
+ Revert test change and add comment why it should not work.
+
+2008-05-27 Stefan Kost <ensonic@users.sf.net>
+
+ * tests/check/gst/gstpipeline.c:
Extending the test a little to verify that we also get the NULL state-
change message.
GstPipeline *pipeline;
GstElement *src, *sink;
GstBus *bus;
- gboolean done;
+ gboolean done = FALSE;
pipeline = GST_PIPELINE (gst_pipeline_new (NULL));
fail_unless (pipeline != NULL, "Could not create pipeline");
fail_unless_equals_int (gst_element_set_state (GST_ELEMENT (pipeline),
GST_STATE_PLAYING), GST_STATE_CHANGE_ASYNC);
- done = FALSE;
while (!done) {
GstMessage *message;
GstState old, new, pending;
fail_unless_equals_int (gst_element_set_state (GST_ELEMENT (pipeline),
GST_STATE_NULL), GST_STATE_CHANGE_SUCCESS);
- done = FALSE;
- while (!done) {
- GstMessage *message;
- GstState old, new, pending;
-
- message = gst_bus_poll (bus, GST_MESSAGE_STATE_CHANGED, -1);
- if (message) {
- gst_message_parse_state_changed (message, &old, &new, &pending);
- GST_DEBUG_OBJECT (message->src, "state change from %d to %d", old, new);
- if (message->src == GST_OBJECT (pipeline) && new == GST_STATE_NULL)
- done = TRUE;
- gst_message_unref (message);
- }
- }
+ /* here we don't get the state change messages, because of auto-flush in
+ * the bus */
gst_object_unref (bus);
gst_object_unref (pipeline);