mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
tests: fix unit-tests for new stream-status
Fix the unit-tests so that they don't fail on the new stream-status messages that are emited now.
This commit is contained in:
parent
540560a758
commit
2efaf65c4c
3 changed files with 13 additions and 10 deletions
|
@ -300,8 +300,9 @@ GST_START_TEST (test_message_state_changed_children)
|
|||
/* each object is referenced by a message;
|
||||
* base_src is blocked in the push and has an extra refcount.
|
||||
* base_sink_chain has taken a refcount on the sink, and is blocked on
|
||||
* preroll */
|
||||
ASSERT_OBJECT_REFCOUNT (src, "src", 2);
|
||||
* preroll
|
||||
* The stream-status message holds another ref to the element */
|
||||
ASSERT_OBJECT_REFCOUNT (src, "src", 3);
|
||||
/* refcount can be 4 if the bin is still processing the async_done message of
|
||||
* the sink. */
|
||||
ASSERT_OBJECT_REFCOUNT_BETWEEN (sink, "sink", 2, 3);
|
||||
|
@ -352,8 +353,9 @@ GST_START_TEST (test_message_state_changed_children)
|
|||
ret = gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_READY);
|
||||
fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
|
||||
|
||||
/* each object is referenced by two messages */
|
||||
ASSERT_OBJECT_REFCOUNT (src, "src", 3);
|
||||
/* each object is referenced by two messages, the source also has the
|
||||
* stream-status message referencing it */
|
||||
ASSERT_OBJECT_REFCOUNT (src, "src", 4);
|
||||
ASSERT_OBJECT_REFCOUNT (sink, "sink", 3);
|
||||
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 3);
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ GST_START_TEST (test_pipeline_unref)
|
|||
|
||||
run_pipeline (pipeline, s,
|
||||
GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED |
|
||||
GST_MESSAGE_ASYNC_DONE, GST_MESSAGE_EOS);
|
||||
GST_MESSAGE_STREAM_STATUS | GST_MESSAGE_ASYNC_DONE, GST_MESSAGE_EOS);
|
||||
while (GST_OBJECT_REFCOUNT_VALUE (src) > 1)
|
||||
THREAD_SWITCH ();
|
||||
ASSERT_OBJECT_REFCOUNT (src, "src", 1);
|
||||
|
|
|
@ -102,27 +102,28 @@ GST_START_TEST (test_2_elements)
|
|||
s = "fakesrc can-activate-push=false ! fakesink can-activate-pull=true";
|
||||
run_pipeline (setup_pipeline (s), s,
|
||||
GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED |
|
||||
GST_MESSAGE_ASYNC_DONE, GST_MESSAGE_UNKNOWN);
|
||||
GST_MESSAGE_STREAM_STATUS | GST_MESSAGE_ASYNC_DONE, GST_MESSAGE_UNKNOWN);
|
||||
|
||||
s = "fakesrc can-activate-push=true ! fakesink can-activate-pull=false";
|
||||
run_pipeline (setup_pipeline (s), s,
|
||||
GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED |
|
||||
GST_MESSAGE_ASYNC_DONE, GST_MESSAGE_UNKNOWN);
|
||||
GST_MESSAGE_STREAM_STATUS | GST_MESSAGE_ASYNC_DONE, GST_MESSAGE_UNKNOWN);
|
||||
|
||||
s = "fakesrc can-activate-push=false num-buffers=10 ! fakesink can-activate-pull=true";
|
||||
run_pipeline (setup_pipeline (s), s,
|
||||
GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED |
|
||||
GST_MESSAGE_ASYNC_DONE, GST_MESSAGE_EOS);
|
||||
GST_MESSAGE_STREAM_STATUS | GST_MESSAGE_ASYNC_DONE, GST_MESSAGE_EOS);
|
||||
|
||||
s = "fakesrc can-activate-push=true num-buffers=10 ! fakesink can-activate-pull=false";
|
||||
run_pipeline (setup_pipeline (s), s,
|
||||
GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED |
|
||||
GST_MESSAGE_ASYNC_DONE, GST_MESSAGE_EOS);
|
||||
GST_MESSAGE_STREAM_STATUS | GST_MESSAGE_ASYNC_DONE, GST_MESSAGE_EOS);
|
||||
|
||||
s = "fakesrc can-activate-push=false ! fakesink can-activate-pull=false";
|
||||
ASSERT_CRITICAL (run_pipeline (setup_pipeline (s), s,
|
||||
GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED |
|
||||
GST_MESSAGE_ASYNC_DONE, GST_MESSAGE_UNKNOWN));
|
||||
GST_MESSAGE_STREAM_STATUS | GST_MESSAGE_ASYNC_DONE,
|
||||
GST_MESSAGE_UNKNOWN));
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
|
Loading…
Reference in a new issue