+2005-09-28 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * check/gst/gstpipeline.c: (GST_START_TEST), (gst_pipeline_suite):
+ add another check
+ * gst/gstbus.c:
+ add some doc
+ * gst/gstinfo.c: (_gst_debug_init):
+ slightly more readable color for refcount debugging
+
2005-09-28 Wim Taymans <wim@fluendo.com>
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_provide_clock_func),
GST_END_TEST;
+GST_START_TEST (test_bus)
+{
+ GstPipeline *pipeline;
+ GstBus *bus;
+
+ pipeline = GST_PIPELINE (gst_pipeline_new (NULL));
+ fail_unless (pipeline != NULL, "Could not create pipeline");
+ ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 1);
+
+ bus = gst_pipeline_get_bus (pipeline);
+ ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline after get_bus", 1);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
+
+ gst_object_unref (pipeline);
+
+ ASSERT_OBJECT_REFCOUNT (bus, "bus after unref pipeline", 1);
+ gst_object_unref (bus);
+}
+
+GST_END_TEST;
+
Suite *
gst_pipeline_suite (void)
{
tcase_add_test (tc_chain, test_async_state_change_empty);
tcase_add_test (tc_chain, test_async_state_change_fake_ready);
tcase_add_test (tc_chain, test_async_state_change_fake);
+ tcase_add_test (tc_chain, test_bus);
return s;
}
* When the func is called, the message belongs to the caller; if you want to
* keep a copy of it, call gst_message_ref() before leaving the func.
*
+ * The watch can be removed using #g_source_remove().
+ *
* Returns: The event source id.
*
* MT safe.
*
* Adds a bus watch to the default main context with the default priority.
*
+ * The watch can be removed using #g_source_remove().
+ *
* Returns: The event source id.
*
* MT safe.
GST_CAT_NEGOTIATION = _gst_debug_category_new ("GST_NEGOTIATION",
GST_DEBUG_BOLD | GST_DEBUG_FG_BLUE, NULL);
GST_CAT_REFCOUNTING = _gst_debug_category_new ("GST_REFCOUNTING",
- GST_DEBUG_BOLD | GST_DEBUG_FG_BLUE | GST_DEBUG_BG_GREEN, NULL);
+ GST_DEBUG_BOLD | GST_DEBUG_FG_RED | GST_DEBUG_BG_BLUE, NULL);
GST_CAT_ERROR_SYSTEM = _gst_debug_category_new ("GST_ERROR_SYSTEM",
GST_DEBUG_BOLD | GST_DEBUG_FG_RED | GST_DEBUG_BG_WHITE, NULL);
GST_END_TEST;
+GST_START_TEST (test_bus)
+{
+ GstPipeline *pipeline;
+ GstBus *bus;
+
+ pipeline = GST_PIPELINE (gst_pipeline_new (NULL));
+ fail_unless (pipeline != NULL, "Could not create pipeline");
+ ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 1);
+
+ bus = gst_pipeline_get_bus (pipeline);
+ ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline after get_bus", 1);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
+
+ gst_object_unref (pipeline);
+
+ ASSERT_OBJECT_REFCOUNT (bus, "bus after unref pipeline", 1);
+ gst_object_unref (bus);
+}
+
+GST_END_TEST;
+
Suite *
gst_pipeline_suite (void)
{
tcase_add_test (tc_chain, test_async_state_change_empty);
tcase_add_test (tc_chain, test_async_state_change_fake_ready);
tcase_add_test (tc_chain, test_async_state_change_fake);
+ tcase_add_test (tc_chain, test_bus);
return s;
}