docs: include tracers in the documentation

Requires exposing the tracer GType from the GstTracerFactory in order
to link the plugin with the tracer in the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=791253
This commit is contained in:
Matthew Waters 2017-12-05 21:36:34 +11:00
parent fa302587dd
commit a0400a0d28
12 changed files with 148 additions and 8 deletions

View file

@ -3354,6 +3354,7 @@ GstTracerPrivate
<TITLE>GstTracerFactory</TITLE>
GstTracerFactory
gst_tracer_factory_get_list
gst_tracer_factory_get_tracer_type
<SUBSECTION Standard>
GstTracerFactoryClass
GST_TRACER_FACTORY

View file

@ -23,7 +23,7 @@ DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
# The directory containing the source code.
# gtk-doc will search all .c & .h files beneath here for inline comments
# documenting functions and macros.
DOC_SOURCE_DIR = $(top_srcdir)/plugins/elements
DOC_SOURCE_DIR = $(top_srcdir)/plugins/elements $(top_srcdir)/plugins/tracers
# Extra options to supply to gtkdoc-scan.
SCAN_OPTIONS=
@ -38,8 +38,8 @@ FIXXREF_OPTIONS=--extra-dir=$(top_builddir)/docs/gst/html \
--extra-dir=$(datadir)/gtk-doc/html
# Used for dependencies.
HFILE_GLOB=$(top_srcdir)/plugins/elements/*.h
CFILE_GLOB=$(top_srcdir)/plugins/elements/*.c
HFILE_GLOB=$(top_srcdir)/plugins/elements/*.h $(top_srcdir)/plugins/tracers/*.h
CFILE_GLOB=$(top_srcdir)/plugins/elements/*.c $(top_srcdir)/plugins/tracers/*.c
# Header files to ignore when scanning.
IGNORE_HFILES =

View file

@ -40,9 +40,19 @@
<xi:include href="xml/element-valve.xml" />
</chapter>
<chapter>
<title>gstreamer Tracers</title>
<xi:include href="xml/element-latencytracer.xml" />
<xi:include href="xml/element-leakstracer.xml" />
<xi:include href="xml/element-logtracer.xml" />
<xi:include href="xml/element-rusagetracer.xml" />
<xi:include href="xml/element-statstracer.xml" />
</chapter>
<chapter>
<title>gstreamer Plugins</title>
<xi:include href="xml/plugin-coreelements.xml" />
<xi:include href="xml/plugin-coretracers.xml" />
</chapter>
</book>

View file

@ -217,6 +217,54 @@ GST_INPUT_SELECTOR_WAIT
gst_input_selector_get_type
</SECTION>
<SECTION>
<FILE>element-latencytracer</FILE>
<TITLE>latencytracer</TITLE>
GstLatencyTracer
<SUBSECTION Standard>
GstLatencyTracerClass
GST_LATENCY_TRACER
GST_LATENCY_TRACER_CAST
GST_IS_LATENCY_TRACER
GST_LATENCY_TRACER_CLASS
GST_IS_LATENCY_TRACER_CLASS
GST_TYPE_LATENCY_TRACER
<SUBSECTION Private>
gst_latency_tracer_get_type
</SECTION>
<SECTION>
<FILE>element-leakstracer</FILE>
<TITLE>leakstracer</TITLE>
GstLeaksTracer
<SUBSECTION Standard>
GstLeaksTracerClass
GST_LEAKS_TRACER
GST_LEAKS_TRACER_CAST
GST_IS_LEAKS_TRACER
GST_LEAKS_TRACER_CLASS
GST_IS_LEAKS_TRACER_CLASS
GST_TYPE_LEAKS_TRACER
<SUBSECTION Private>
gst_leaks_tracer_get_type
</SECTION>
<SECTION>
<FILE>element-logtracer</FILE>
<TITLE>logtracer</TITLE>
GstLogTracer
<SUBSECTION Standard>
GstLogTracerClass
GST_LOG_TRACER
GST_LOG_TRACER_CAST
GST_IS_LOG_TRACER
GST_LOG_TRACER_CLASS
GST_IS_LOG_TRACER_CLASS
GST_TYPE_LOG_TRACER
<SUBSECTION Private>
gst_log_tracer_get_type
</SECTION>
<SECTION>
<FILE>element-multiqueue</FILE>
<TITLE>multiqueue</TITLE>
@ -285,6 +333,38 @@ GstQueue2Range
gst_queue2_get_type
</SECTION>
<SECTION>
<FILE>element-rusagetracer</FILE>
<TITLE>rusagetracer</TITLE>
GstRUsageTracer
<SUBSECTION Standard>
GstRUsageTracerClass
GST_RUSAGE_TRACER
GST_RUSAGE_TRACER_CAST
GST_IS_RUSAGE_TRACER
GST_RUSAGE_TRACER_CLASS
GST_IS_RUSAGE_TRACER_CLASS
GST_TYPE_RUSAGE_TRACER
<SUBSECTION Private>
gst_rusage_tracer_get_type
</SECTION>
<SECTION>
<FILE>element-statstracer</FILE>
<TITLE>statstracer</TITLE>
GstStatsTracer
<SUBSECTION Standard>
GstStatsTracerClass
GST_STATS_TRACER
GST_STATS_TRACER_CAST
GST_IS_STATS_TRACER
GST_STATS_TRACER_CLASS
GST_IS_STATS_TRACER_CLASS
GST_TYPE_STATS_TRACER
<SUBSECTION Private>
gst_stats_tracer_get_type
</SECTION>
<SECTION>
<FILE>element-streamiddemux</FILE>
<TITLE>streamiddemux</TITLE>

View file

@ -0,0 +1,28 @@
<plugin>
<name>coretracers</name>
<description>GStreamer core tracers</description>
<filename>../../plugins/tracers/.libs/libgstcoretracers.so</filename>
<basename>libgstcoretracers.so</basename>
<version>1.13.0.1</version>
<license>LGPL</license>
<source>gstreamer</source>
<package>GStreamer git</package>
<origin>Unknown package origin</origin>
<elements>
<tracer>
<name>latency</name>
</tracer>
<tracer>
<name>leaks</name>
</tracer>
<tracer>
<name>log</name>
</tracer>
<tracer>
<name>rusage</name>
</tracer>
<tracer>
<name>stats</name>
</tracer>
</elements>
</plugin>

View file

@ -77,3 +77,22 @@ gst_tracer_factory_get_list (void)
return gst_registry_get_feature_list (gst_registry_get (),
GST_TYPE_TRACER_FACTORY);
}
/**
* gst_tracer_factory_get_tracer_type:
* @factory: factory to get managed #GType from
*
* Get the #GType for elements managed by this factory. The type can
* only be retrieved if the element factory is loaded, which can be
* assured with gst_plugin_feature_load().
*
* Returns: the #GType for tracers managed by this factory or 0 if
* the factory is not loaded.
*/
GType
gst_tracer_factory_get_tracer_type (GstTracerFactory * factory)
{
g_return_val_if_fail (GST_IS_TRACER_FACTORY (factory), 0);
return factory->type;
}

View file

@ -54,6 +54,8 @@ GType gst_tracer_factory_get_type (void);
GST_EXPORT
GList * gst_tracer_factory_get_list (void);
GST_EXPORT
GType gst_tracer_factory_get_tracer_type (GstTracerFactory * factory);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracerFactory, gst_object_unref)

View file

@ -19,7 +19,7 @@
* Boston, MA 02110-1301, USA.
*/
/**
* SECTION:gstlatency
* SECTION:element-latencytracer
* @short_description: log processing latency stats
*
* A tracing module that determines src-to-sink latencies by injecting custom

View file

@ -19,7 +19,7 @@
* Boston, MA 02110-1301, USA.
*/
/**
* SECTION:gstleaks
* SECTION:element-leakstracer
* @short_description: detect GstObject and GstMiniObject leaks
*
* A tracing module tracking the lifetime of objects by logging those still

View file

@ -19,7 +19,7 @@
* Boston, MA 02110-1301, USA.
*/
/**
* SECTION:gstlog
* SECTION:element-logtracer
* @short_description: log hook event
*
* A tracing module that logs all data from all hooks.

View file

@ -19,7 +19,7 @@
* Boston, MA 02110-1301, USA.
*/
/**
* SECTION:gstrusage
* SECTION:element-rusagetracer
* @short_description: log resource usage stats
*
* A tracing module that take rusage() snapshots and logs them.

View file

@ -19,7 +19,7 @@
* Boston, MA 02110-1301, USA.
*/
/**
* SECTION:gststats
* SECTION:element-statstracer
* @short_description: log event stats
*
* A tracing module that builds usage statistic for elements and pads.