mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:36:13 +00:00
tests/check/gst/gstpipeline.c: Revert test change and add comment why it should not work.
Original commit message from CVS: * tests/check/gst/gstpipeline.c: Revert test change and add comment why it should not work.
This commit is contained in:
parent
6bb62a810a
commit
9b3b823aa5
2 changed files with 8 additions and 16 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2008-05-27 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* tests/check/gst/gstpipeline.c:
|
* tests/check/gst/gstpipeline.c:
|
||||||
|
|
|
@ -70,7 +70,7 @@ GST_START_TEST (test_async_state_change_fake)
|
||||||
GstPipeline *pipeline;
|
GstPipeline *pipeline;
|
||||||
GstElement *src, *sink;
|
GstElement *src, *sink;
|
||||||
GstBus *bus;
|
GstBus *bus;
|
||||||
gboolean done;
|
gboolean done = FALSE;
|
||||||
|
|
||||||
pipeline = GST_PIPELINE (gst_pipeline_new (NULL));
|
pipeline = GST_PIPELINE (gst_pipeline_new (NULL));
|
||||||
fail_unless (pipeline != NULL, "Could not create pipeline");
|
fail_unless (pipeline != NULL, "Could not create pipeline");
|
||||||
|
@ -86,7 +86,6 @@ GST_START_TEST (test_async_state_change_fake)
|
||||||
fail_unless_equals_int (gst_element_set_state (GST_ELEMENT (pipeline),
|
fail_unless_equals_int (gst_element_set_state (GST_ELEMENT (pipeline),
|
||||||
GST_STATE_PLAYING), GST_STATE_CHANGE_ASYNC);
|
GST_STATE_PLAYING), GST_STATE_CHANGE_ASYNC);
|
||||||
|
|
||||||
done = FALSE;
|
|
||||||
while (!done) {
|
while (!done) {
|
||||||
GstMessage *message;
|
GstMessage *message;
|
||||||
GstState old, new, pending;
|
GstState old, new, pending;
|
||||||
|
@ -104,20 +103,8 @@ GST_START_TEST (test_async_state_change_fake)
|
||||||
fail_unless_equals_int (gst_element_set_state (GST_ELEMENT (pipeline),
|
fail_unless_equals_int (gst_element_set_state (GST_ELEMENT (pipeline),
|
||||||
GST_STATE_NULL), GST_STATE_CHANGE_SUCCESS);
|
GST_STATE_NULL), GST_STATE_CHANGE_SUCCESS);
|
||||||
|
|
||||||
done = FALSE;
|
/* here we don't get the state change messages, because of auto-flush in
|
||||||
while (!done) {
|
* the bus */
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gst_object_unref (bus);
|
gst_object_unref (bus);
|
||||||
gst_object_unref (pipeline);
|
gst_object_unref (pipeline);
|
||||||
|
|
Loading…
Reference in a new issue