2005-09-19 Thomas Vander Stichele <thomas at apestaart dot org>
* 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 <thomas at apestaart dot org>
+
+ * check/Makefile.am:
re-enable tests now that leaks are plugged
* check/gst/gst.c:
* check/gst/gstbin.c:
gst/gstevent \
generic/states \
gst-libs/controller \
- pipelines/cleanup \
pipelines/simple_launch_lines
# these need fixing because the threads cause segfaults under valgrind
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);
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)
return pipeline;
}
-/*
+/*
* run_pipeline:
* @pipe: the pipeline to run
* @desc: the description for use in messages
* 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;
}
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)
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
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (pipeline);
+ gst_object_unref (bus);
assert_live_count (GST_TYPE_BUFFER, 0);
}
- 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 ?)
@Returns:
-<!-- ##### FUNCTION gst_plugin_feature_filter ##### -->
-<para>
-
-</para>
-
-@plugin:
-@filter:
-@first:
-@user_data:
-@Returns:
-
-
-<!-- ##### FUNCTION gst_plugin_list_feature_filter ##### -->
-<para>
-
-</para>
-
-@list:
-@filter:
-@first:
-@user_data:
-@Returns:
-
-
<!-- ##### FUNCTION gst_plugin_name_filter ##### -->
<para>
@Returns:
-<!-- ##### FUNCTION gst_plugin_get_feature_list ##### -->
-<para>
-
-</para>
-
-@plugin:
-@Returns:
-
-
-<!-- ##### FUNCTION gst_plugin_find_feature ##### -->
-<para>
-
-</para>
-
-@plugin:
-@name:
-@type:
-@Returns:
-
-
<!-- ##### FUNCTION gst_plugin_check_file ##### -->
<para>
@Returns:
-<!-- ##### FUNCTION gst_plugin_add_feature ##### -->
-<para>
-
-</para>
-
-@plugin:
-@feature:
-
-
<!-- ##### FUNCTION gst_plugin_load ##### -->
<para>
<!-- ##### SECTION Stability_Level ##### -->
-<!-- ##### STRUCT gst_getbits_t ##### -->
-<para>
-
-</para>
-
-@ptr:
-@longptr:
-@endptr:
-@length:
-@bits:
-@dword:
-@temp:
-@callback:
-@data:
-@get1bit:
-@getbits:
-@getbits_fast:
-@getbyte:
-@show1bit:
-@showbits:
-@flushbits:
-@backbits:
-
-<!-- ##### USER_FUNCTION GstGetbitsCallback ##### -->
-<para>
-
-</para>
-
-@gb:
-@data:
-
-
-<!-- ##### FUNCTION gst_getbits_init ##### -->
-<para>
-
-</para>
-
-@gb:
-@callback:
-@data:
-
-
-<!-- ##### FUNCTION gst_getbits_newbuf ##### -->
-<para>
-
-</para>
-
-@gb:
-@buffer:
-@Param3:
-
-
-<!-- ##### MACRO gst_getbits_bitoffset ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits_align_byte ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits_bufferpos ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits_bytesleft ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits_bitsleft ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbyte ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits_fastn ##### -->
-<para>
-
-</para>
-
-@gb:
-@n:
-
-
-<!-- ##### MACRO gst_getbitsn ##### -->
-<para>
-
-</para>
-
-@gb:
-@n:
-<!-- # Unused Parameters # -->
-@num:
-
-
-<!-- ##### MACRO gst_getbits1 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits2 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits3 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits4 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits5 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits6 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits7 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits8 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits9 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits10 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits11 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits12 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits13 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits14 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits15 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits16 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits17 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits18 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits19 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits20 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits21 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits22 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_getbits23 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbitsn ##### -->
-<para>
-
-</para>
-
-@gb:
-@n:
-<!-- # Unused Parameters # -->
-@num:
-
-
-<!-- ##### MACRO gst_showbits1 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits2 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits3 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits4 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits5 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits6 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits7 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits8 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits9 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits10 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits11 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits12 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits13 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits14 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits15 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits16 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits17 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits18 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits19 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits20 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits21 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits22 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits23 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits24 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_showbits32 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_flushbitsn ##### -->
-<para>
-
-</para>
-
-@gb:
-@n:
-<!-- # Unused Parameters # -->
-@num:
-
-
-<!-- ##### MACRO gst_flushbits32 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
-<!-- ##### MACRO gst_backbitsn ##### -->
-<para>
-
-</para>
-
-@gb:
-@n:
-<!-- # Unused Parameters # -->
-@num:
-
-
-<!-- ##### MACRO gst_backbits24 ##### -->
-<para>
-
-</para>
-
-@gb:
-
-
gst/gstevent \
generic/states \
gst-libs/controller \
- pipelines/cleanup \
pipelines/simple_launch_lines
# these need fixing because the threads cause segfaults under valgrind
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);
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)
return pipeline;
}
-/*
+/*
* run_pipeline:
* @pipe: the pipeline to run
* @desc: the description for use in messages
* 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;
}
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)
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
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (pipeline);
+ gst_object_unref (bus);
assert_live_count (GST_TYPE_BUFFER, 0);
}