check/: Allow new clock message too.
authorWim Taymans <wim.taymans@gmail.com>
Sat, 8 Oct 2005 13:10:34 +0000 (13:10 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Sat, 8 Oct 2005 13:10:34 +0000 (13:10 +0000)
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/pipelines/cleanup.c: (GST_START_TEST):
* check/pipelines/simple_launch_lines.c: (GST_START_TEST):
Allow new clock message too.

ChangeLog
check/gst/gstbin.c
check/pipelines/cleanup.c
check/pipelines/simple_launch_lines.c
tests/check/gst/gstbin.c
tests/check/pipelines/cleanup.c
tests/check/pipelines/simple-launch-lines.c

index bd4fa54e11344bce620b63b425bac63dce4cce22..ab9781281bee7e7ce33bb29d3cc172031c3ff6e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-08  Wim Taymans  <wim@fluendo.com>
+
+       * check/gst/gstbin.c: (GST_START_TEST):
+       * check/pipelines/cleanup.c: (GST_START_TEST):
+       * check/pipelines/simple_launch_lines.c: (GST_START_TEST):
+       Allow new clock message too.
+
 2005-10-08  Wim Taymans  <wim@fluendo.com>
 
        * gst/gstmessage.c: (gst_message_new_error),
index 020e9143a7efddaf6f5580541f5c229804838f02..c04cce3e7da6a91d0ae74b3c005c47a7fdf90807 100644 (file)
@@ -279,10 +279,11 @@ GST_START_TEST (test_message_state_changed_children)
       == GST_STATE_CHANGE_SUCCESS);
 
   /* each object is referenced by one message
-   * sink might have an extra reference if it's still blocked on preroll */
+   * sink might have an extra reference if it's still blocked on preroll
+   * pipeline posted a new-clock message too. */
   ASSERT_OBJECT_REFCOUNT (src, "src", 2);
   ASSERT_OBJECT_REFCOUNT_BETWEEN (sink, "sink", 2, 3);
-  ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 2);
+  ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 3);
 
   pop_messages (bus, 3);
   fail_if ((gst_bus_pop (bus)) != NULL);
index 926f2341a80124b5b0509f18f7abeb53ffa8503b..a35c9234460d23159f249985e44e085e2f656872 100644 (file)
@@ -89,7 +89,8 @@ GST_START_TEST (test_pipeline_unref)
   sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");
   fail_if (sink == NULL);
 
-  run_pipeline (pipeline, s, GST_MESSAGE_STATE_CHANGED, GST_MESSAGE_EOS);
+  run_pipeline (pipeline, s, GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED,
+      GST_MESSAGE_EOS);
   count = GST_OBJECT_REFCOUNT_VALUE (src);
   fail_unless (count == 1, "src has a refcount of %d instead of 1", count);
   count = GST_OBJECT_REFCOUNT_VALUE (sink);
index b69eb1050bcb29b56f20bf7a192406c21fc65d59..6506e20a7efda7f109c6b2a764a27638dc27dd2e 100644 (file)
@@ -93,23 +93,24 @@ 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_STATE_CHANGED, GST_MESSAGE_UNKNOWN);
+      GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED, GST_MESSAGE_UNKNOWN);
 
   s = "fakesrc can-activate-push=true ! fakesink can-activate-pull=false";
   run_pipeline (setup_pipeline (s), s,
-      GST_MESSAGE_STATE_CHANGED, GST_MESSAGE_UNKNOWN);
+      GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED, 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_STATE_CHANGED, GST_MESSAGE_EOS);
+      GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED, 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_STATE_CHANGED, GST_MESSAGE_EOS);
+      GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED, GST_MESSAGE_EOS);
 
   s = "fakesrc can-activate-push=false ! fakesink can-activate-pull=false";
   ASSERT_CRITICAL (run_pipeline (setup_pipeline (s), s,
-          GST_MESSAGE_STATE_CHANGED, GST_MESSAGE_UNKNOWN));
+          GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED,
+          GST_MESSAGE_UNKNOWN));
 }
 
 GST_END_TEST;
index 020e9143a7efddaf6f5580541f5c229804838f02..c04cce3e7da6a91d0ae74b3c005c47a7fdf90807 100644 (file)
@@ -279,10 +279,11 @@ GST_START_TEST (test_message_state_changed_children)
       == GST_STATE_CHANGE_SUCCESS);
 
   /* each object is referenced by one message
-   * sink might have an extra reference if it's still blocked on preroll */
+   * sink might have an extra reference if it's still blocked on preroll
+   * pipeline posted a new-clock message too. */
   ASSERT_OBJECT_REFCOUNT (src, "src", 2);
   ASSERT_OBJECT_REFCOUNT_BETWEEN (sink, "sink", 2, 3);
-  ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 2);
+  ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 3);
 
   pop_messages (bus, 3);
   fail_if ((gst_bus_pop (bus)) != NULL);
index 926f2341a80124b5b0509f18f7abeb53ffa8503b..a35c9234460d23159f249985e44e085e2f656872 100644 (file)
@@ -89,7 +89,8 @@ GST_START_TEST (test_pipeline_unref)
   sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");
   fail_if (sink == NULL);
 
-  run_pipeline (pipeline, s, GST_MESSAGE_STATE_CHANGED, GST_MESSAGE_EOS);
+  run_pipeline (pipeline, s, GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED,
+      GST_MESSAGE_EOS);
   count = GST_OBJECT_REFCOUNT_VALUE (src);
   fail_unless (count == 1, "src has a refcount of %d instead of 1", count);
   count = GST_OBJECT_REFCOUNT_VALUE (sink);
index b69eb1050bcb29b56f20bf7a192406c21fc65d59..6506e20a7efda7f109c6b2a764a27638dc27dd2e 100644 (file)
@@ -93,23 +93,24 @@ 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_STATE_CHANGED, GST_MESSAGE_UNKNOWN);
+      GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED, GST_MESSAGE_UNKNOWN);
 
   s = "fakesrc can-activate-push=true ! fakesink can-activate-pull=false";
   run_pipeline (setup_pipeline (s), s,
-      GST_MESSAGE_STATE_CHANGED, GST_MESSAGE_UNKNOWN);
+      GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED, 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_STATE_CHANGED, GST_MESSAGE_EOS);
+      GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED, 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_STATE_CHANGED, GST_MESSAGE_EOS);
+      GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED, GST_MESSAGE_EOS);
 
   s = "fakesrc can-activate-push=false ! fakesink can-activate-pull=false";
   ASSERT_CRITICAL (run_pipeline (setup_pipeline (s), s,
-          GST_MESSAGE_STATE_CHANGED, GST_MESSAGE_UNKNOWN));
+          GST_MESSAGE_NEW_CLOCK | GST_MESSAGE_STATE_CHANGED,
+          GST_MESSAGE_UNKNOWN));
 }
 
 GST_END_TEST;