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),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_clock_provide),
== 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);
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);
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;
== 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);
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);
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;