From 1b8f44e409bf69994d838fafe1673c066b6ca730 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 19 Sep 2005 14:41:57 +0000 Subject: [PATCH] check/: enable cleanup again after fixing the leak Original commit message from CVS: * check/Makefile.am: * check/pipelines/cleanup.c: (run_pipeline): * check/pipelines/simple_launch_lines.c: (run_pipeline), (GST_START_TEST): enable cleanup again after fixing the leak * docs/README: some more info on docs --- ChangeLog | 10 + check/Makefile.am | 1 - check/pipelines/cleanup.c | 11 +- check/pipelines/simple_launch_lines.c | 21 +- docs/README | 4 +- docs/gst/tmpl/gstplugin.sgml | 53 --- docs/libs/tmpl/gstgetbits.sgml | 553 ---------------------------- tests/check/Makefile.am | 1 - tests/check/pipelines/cleanup.c | 11 +- tests/check/pipelines/simple-launch-lines.c | 21 +- 10 files changed, 51 insertions(+), 635 deletions(-) diff --git a/ChangeLog b/ChangeLog index 321fcf5..378f764 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,16 @@ 2005-09-19 Thomas Vander Stichele * check/Makefile.am: + * check/pipelines/cleanup.c: (run_pipeline): + * check/pipelines/simple_launch_lines.c: (run_pipeline), + (GST_START_TEST): + enable cleanup again after fixing the leak + * docs/README: + some more info on docs + +2005-09-19 Thomas Vander Stichele + + * check/Makefile.am: re-enable tests now that leaks are plugged * check/gst/gst.c: * check/gst/gstbin.c: diff --git a/check/Makefile.am b/check/Makefile.am index 5e93d36..bb2e54b 100644 --- a/check/Makefile.am +++ b/check/Makefile.am @@ -82,7 +82,6 @@ VALGRIND_TO_FIX = \ gst/gstevent \ generic/states \ gst-libs/controller \ - pipelines/cleanup \ pipelines/simple_launch_lines # these need fixing because the threads cause segfaults under valgrind diff --git a/check/pipelines/cleanup.c b/check/pipelines/cleanup.c index 5024db4..926f234 100644 --- a/check/pipelines/cleanup.c +++ b/check/pipelines/cleanup.c @@ -37,15 +37,15 @@ setup_pipeline (gchar * pipe_descr) the poll call will time out after half a second. */ static void -run_pipeline (GstElement * pipe, gchar * descr, +run_pipeline (GstElement * pipeline, gchar * descr, GstMessageType events, GstMessageType tevent) { GstBus *bus; GstMessageType revent; - bus = gst_element_get_bus (pipe); + bus = gst_element_get_bus (pipeline); g_assert (bus); - gst_element_set_state (pipe, GST_STATE_PLAYING); + gst_element_set_state (pipeline, GST_STATE_PLAYING); while (1) { GstMessage *message = gst_bus_poll (bus, GST_MESSAGE_ANY, GST_SECOND / 2); @@ -70,8 +70,9 @@ run_pipeline (GstElement * pipe, gchar * descr, revent, tevent, descr); } - gst_element_set_state (pipe, GST_STATE_NULL); - gst_object_unref (pipe); + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (pipeline); + gst_object_unref (bus); } GST_START_TEST (test_pipeline_unref) diff --git a/check/pipelines/simple_launch_lines.c b/check/pipelines/simple_launch_lines.c index c40b88f..b69eb10 100644 --- a/check/pipelines/simple_launch_lines.c +++ b/check/pipelines/simple_launch_lines.c @@ -33,7 +33,7 @@ setup_pipeline (gchar * pipe_descr) return pipeline; } -/* +/* * run_pipeline: * @pipe: the pipeline to run * @desc: the description for use in messages @@ -43,16 +43,16 @@ setup_pipeline (gchar * pipe_descr) * the poll call will time out after half a second. */ static void -run_pipeline (GstElement * pipe, gchar * descr, +run_pipeline (GstElement * pipeline, gchar * descr, GstMessageType events, GstMessageType tevent) { GstBus *bus; GstMessageType revent; - g_assert (pipe); - bus = gst_element_get_bus (pipe); + g_assert (pipeline); + bus = gst_element_get_bus (pipeline); g_assert (bus); - if (gst_element_set_state (pipe, + if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS) { g_critical ("Couldn't set pipeline to PLAYING"); goto done; @@ -82,8 +82,9 @@ run_pipeline (GstElement * pipe, gchar * descr, } done: - gst_element_set_state (pipe, GST_STATE_NULL); - gst_object_unref (pipe); + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (pipeline); + gst_object_unref (bus); } GST_START_TEST (test_2_elements) @@ -110,7 +111,10 @@ GST_START_TEST (test_2_elements) ASSERT_CRITICAL (run_pipeline (setup_pipeline (s), s, GST_MESSAGE_STATE_CHANGED, GST_MESSAGE_UNKNOWN)); } -GST_END_TEST static void + +GST_END_TEST; + +static void got_handoff (GstElement * sink, GstBuffer * buf, GstPad * pad, gpointer unused) { gst_element_post_message @@ -174,6 +178,7 @@ GST_START_TEST (test_stop_from_app) gst_element_set_state (pipeline, GST_STATE_NULL); gst_object_unref (pipeline); + gst_object_unref (bus); assert_live_count (GST_TYPE_BUFFER, 0); } diff --git a/docs/README b/docs/README index 1f9670c..2a00766 100644 --- a/docs/README +++ b/docs/README @@ -222,7 +222,9 @@ in the various plugin packages. - add an xinclude of a file named "element-(element)-example.xml" to the docbook documentation piece in the element source code - add the header to EXTRA_HFILES in Makefile.am to be able to document - signals and args + signals and args; in that case, the object struct needs to be in + -sections.txt outside of the Standard Subsection (which is annoying, + but ...) (FIXME: are we sure we can both do the xinclude from the tmpl/ sgml, as well as an override from the source itself ? maybe we should just make sure the xinclude is in the source itself instead ?) diff --git a/docs/gst/tmpl/gstplugin.sgml b/docs/gst/tmpl/gstplugin.sgml index e1345e8..6752244 100644 --- a/docs/gst/tmpl/gstplugin.sgml +++ b/docs/gst/tmpl/gstplugin.sgml @@ -244,30 +244,6 @@ to get a list of plugins that match certain criteria. @Returns: - - - - - -@plugin: -@filter: -@first: -@user_data: -@Returns: - - - - - - - -@list: -@filter: -@first: -@user_data: -@Returns: - - @@ -278,26 +254,6 @@ to get a list of plugins that match certain criteria. @Returns: - - - - - -@plugin: -@Returns: - - - - - - - -@plugin: -@name: -@type: -@Returns: - - @@ -318,15 +274,6 @@ to get a list of plugins that match certain criteria. @Returns: - - - - - -@plugin: -@feature: - - diff --git a/docs/libs/tmpl/gstgetbits.sgml b/docs/libs/tmpl/gstgetbits.sgml index e3e087a..9b00417 100644 --- a/docs/libs/tmpl/gstgetbits.sgml +++ b/docs/libs/tmpl/gstgetbits.sgml @@ -17,556 +17,3 @@ accelerated routines for getting bits from a data stream. - - - - - -@ptr: -@longptr: -@endptr: -@length: -@bits: -@dword: -@temp: -@callback: -@data: -@get1bit: -@getbits: -@getbits_fast: -@getbyte: -@show1bit: -@showbits: -@flushbits: -@backbits: - - - - - - -@gb: -@data: - - - - - - - -@gb: -@callback: -@data: - - - - - - - -@gb: -@buffer: -@Param3: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: -@n: - - - - - - - -@gb: -@n: - -@num: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: -@n: - -@num: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: - - - - - - - -@gb: -@n: - -@num: - - - - - - - -@gb: - - - - - - - -@gb: -@n: - -@num: - - - - - - - -@gb: - - diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index 5e93d36..bb2e54b 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -82,7 +82,6 @@ VALGRIND_TO_FIX = \ gst/gstevent \ generic/states \ gst-libs/controller \ - pipelines/cleanup \ pipelines/simple_launch_lines # these need fixing because the threads cause segfaults under valgrind diff --git a/tests/check/pipelines/cleanup.c b/tests/check/pipelines/cleanup.c index 5024db4..926f234 100644 --- a/tests/check/pipelines/cleanup.c +++ b/tests/check/pipelines/cleanup.c @@ -37,15 +37,15 @@ setup_pipeline (gchar * pipe_descr) the poll call will time out after half a second. */ static void -run_pipeline (GstElement * pipe, gchar * descr, +run_pipeline (GstElement * pipeline, gchar * descr, GstMessageType events, GstMessageType tevent) { GstBus *bus; GstMessageType revent; - bus = gst_element_get_bus (pipe); + bus = gst_element_get_bus (pipeline); g_assert (bus); - gst_element_set_state (pipe, GST_STATE_PLAYING); + gst_element_set_state (pipeline, GST_STATE_PLAYING); while (1) { GstMessage *message = gst_bus_poll (bus, GST_MESSAGE_ANY, GST_SECOND / 2); @@ -70,8 +70,9 @@ run_pipeline (GstElement * pipe, gchar * descr, revent, tevent, descr); } - gst_element_set_state (pipe, GST_STATE_NULL); - gst_object_unref (pipe); + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (pipeline); + gst_object_unref (bus); } GST_START_TEST (test_pipeline_unref) diff --git a/tests/check/pipelines/simple-launch-lines.c b/tests/check/pipelines/simple-launch-lines.c index c40b88f..b69eb10 100644 --- a/tests/check/pipelines/simple-launch-lines.c +++ b/tests/check/pipelines/simple-launch-lines.c @@ -33,7 +33,7 @@ setup_pipeline (gchar * pipe_descr) return pipeline; } -/* +/* * run_pipeline: * @pipe: the pipeline to run * @desc: the description for use in messages @@ -43,16 +43,16 @@ setup_pipeline (gchar * pipe_descr) * the poll call will time out after half a second. */ static void -run_pipeline (GstElement * pipe, gchar * descr, +run_pipeline (GstElement * pipeline, gchar * descr, GstMessageType events, GstMessageType tevent) { GstBus *bus; GstMessageType revent; - g_assert (pipe); - bus = gst_element_get_bus (pipe); + g_assert (pipeline); + bus = gst_element_get_bus (pipeline); g_assert (bus); - if (gst_element_set_state (pipe, + if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS) { g_critical ("Couldn't set pipeline to PLAYING"); goto done; @@ -82,8 +82,9 @@ run_pipeline (GstElement * pipe, gchar * descr, } done: - gst_element_set_state (pipe, GST_STATE_NULL); - gst_object_unref (pipe); + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (pipeline); + gst_object_unref (bus); } GST_START_TEST (test_2_elements) @@ -110,7 +111,10 @@ GST_START_TEST (test_2_elements) ASSERT_CRITICAL (run_pipeline (setup_pipeline (s), s, GST_MESSAGE_STATE_CHANGED, GST_MESSAGE_UNKNOWN)); } -GST_END_TEST static void + +GST_END_TEST; + +static void got_handoff (GstElement * sink, GstBuffer * buf, GstPad * pad, gpointer unused) { gst_element_post_message @@ -174,6 +178,7 @@ GST_START_TEST (test_stop_from_app) gst_element_set_state (pipeline, GST_STATE_NULL); gst_object_unref (pipeline); + gst_object_unref (bus); assert_live_count (GST_TYPE_BUFFER, 0); } -- 2.7.4