check/states/sinks.c (test_src_sink): Cleanups from the state change patch.
authorAndy Wingo <wingo@pobox.com>
Mon, 10 Oct 2005 11:04:55 +0000 (11:04 +0000)
committerAndy Wingo <wingo@pobox.com>
Mon, 10 Oct 2005 11:04:55 +0000 (11:04 +0000)
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.

ChangeLog
check/states/sinks.c
tests/check/generic/sinks.c

index 24c0b5f..a859c3d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 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
        the state change patch.
 
index c9ccd49..af4dffe 100644 (file)
@@ -91,6 +91,11 @@ GST_START_TEST (test_src_sink)
   fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "not playing");
   fail_unless (current == GST_STATE_PLAYING, "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
@@ -177,7 +182,9 @@ GST_START_TEST (test_livesrc_sink)
   fail_unless (pending == GST_STATE_VOID_PENDING, "not 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);
   fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "not playing");
index c9ccd49..af4dffe 100644 (file)
@@ -91,6 +91,11 @@ GST_START_TEST (test_src_sink)
   fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "not playing");
   fail_unless (current == GST_STATE_PLAYING, "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
@@ -177,7 +182,9 @@ GST_START_TEST (test_livesrc_sink)
   fail_unless (pending == GST_STATE_VOID_PENDING, "not 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);
   fail_unless (ret == GST_STATE_CHANGE_SUCCESS, "not playing");