mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
check/gst/gstpipeline.c: add another check
Original commit message from CVS: * 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
This commit is contained in:
parent
de789ca484
commit
5ae3bc47ec
5 changed files with 58 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
|||
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),
|
||||
|
|
|
@ -108,6 +108,27 @@ GST_START_TEST (test_async_state_change_fake)
|
|||
|
||||
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)
|
||||
{
|
||||
|
@ -118,6 +139,7 @@ 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;
|
||||
}
|
||||
|
|
|
@ -595,6 +595,8 @@ gst_bus_create_watch (GstBus * bus, GstMessageType events)
|
|||
* 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.
|
||||
|
@ -632,6 +634,8 @@ gst_bus_add_watch_full (GstBus * bus, gint priority, GstMessageType events,
|
|||
*
|
||||
* 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.
|
||||
|
|
|
@ -319,7 +319,7 @@ _gst_debug_init (void)
|
|||
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);
|
||||
|
||||
|
|
|
@ -108,6 +108,27 @@ GST_START_TEST (test_async_state_change_fake)
|
|||
|
||||
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)
|
||||
{
|
||||
|
@ -118,6 +139,7 @@ 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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue