check/states/sinks.c (test_src_sink): Cleanups from the state change patch.

Original commit message from CVS:
2005-10-10  Andy Wingo  <wingo@pobox.com>

* check/states/sinks.c (test_src_sink): Cleanups from the state
change patch.
(test_livesrc_sink): Sync on the state.
This commit is contained in:
Andy Wingo 2005-10-10 11:04:55 +00:00
parent 4353da375f
commit a7d07e2b7e
3 changed files with 20 additions and 2 deletions

View file

@ -1,5 +1,9 @@
2005-10-10 Andy Wingo <wingo@pobox.com> 2005-10-10 Andy Wingo <wingo@pobox.com>
* check/states/sinks.c (test_src_sink): Cleanups from the state
change patch.
(test_livesrc_sink): Sync on the state.
* check/pipelines/simple_launch_lines.c (run_pipeline): Merge from * check/pipelines/simple_launch_lines.c (run_pipeline): Merge from
the state change patch. the state change patch.

View file

@ -91,6 +91,11 @@ GST_START_TEST (test_src_sink)
fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "not playing"); fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "not playing");
fail_unless (current == GST_STATE_PLAYING, "not playing"); fail_unless (current == GST_STATE_PLAYING, "not playing");
fail_unless (pending == GST_STATE_VOID_PENDING, "not playing"); fail_unless (pending == GST_STATE_VOID_PENDING, "not playing");
ret = gst_element_set_state (pipeline, GST_STATE_NULL);
fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "cannot null pipeline");
gst_object_unref (pipeline);
} }
GST_END_TEST GST_END_TEST
@ -177,7 +182,9 @@ GST_START_TEST (test_livesrc_sink)
fail_unless (pending == GST_STATE_VOID_PENDING, "not playing"); fail_unless (pending == GST_STATE_VOID_PENDING, "not playing");
ret = gst_element_set_state (pipeline, GST_STATE_PLAYING); ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "cannot force play"); ret = gst_element_get_state (pipeline, NULL, NULL, NULL);
fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "cannot force play got %d",
ret);
ret = gst_element_get_state (pipeline, &current, &pending, NULL); ret = gst_element_get_state (pipeline, &current, &pending, NULL);
fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "not playing"); fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "not playing");

View file

@ -91,6 +91,11 @@ GST_START_TEST (test_src_sink)
fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "not playing"); fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "not playing");
fail_unless (current == GST_STATE_PLAYING, "not playing"); fail_unless (current == GST_STATE_PLAYING, "not playing");
fail_unless (pending == GST_STATE_VOID_PENDING, "not playing"); fail_unless (pending == GST_STATE_VOID_PENDING, "not playing");
ret = gst_element_set_state (pipeline, GST_STATE_NULL);
fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "cannot null pipeline");
gst_object_unref (pipeline);
} }
GST_END_TEST GST_END_TEST
@ -177,7 +182,9 @@ GST_START_TEST (test_livesrc_sink)
fail_unless (pending == GST_STATE_VOID_PENDING, "not playing"); fail_unless (pending == GST_STATE_VOID_PENDING, "not playing");
ret = gst_element_set_state (pipeline, GST_STATE_PLAYING); ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "cannot force play"); ret = gst_element_get_state (pipeline, NULL, NULL, NULL);
fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "cannot force play got %d",
ret);
ret = gst_element_get_state (pipeline, &current, &pending, NULL); ret = gst_element_get_state (pipeline, &current, &pending, NULL);
fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "not playing"); fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "not playing");