docs: Add tracers support

This commit is contained in:
Thibault Saunier 2019-05-30 23:23:35 -04:00
parent bcb4be455e
commit f040102d45
9 changed files with 63 additions and 19 deletions

View file

@ -784,14 +784,31 @@ main (int argc, char *argv[])
for (tmp = features; tmp; tmp = tmp->next) {
GstPluginFeature *feature = tmp->data;
if (GST_IS_ELEMENT_FACTORY (feature)) {
if (!f)
g_string_append_printf (json, ",");
f = FALSE;
_add_element_details (json, feature);
f = FALSE;
}
}
g_string_append (json, "}, \"tracers\": {");
gst_plugin_feature_list_free (features);
f = TRUE;
features =
gst_registry_get_feature_list_by_plugin (gst_registry_get (),
gst_plugin_get_name (plugin));
for (tmp = features; tmp; tmp = tmp->next) {
GstPluginFeature *feature = tmp->data;
if (GST_IS_TRACER_FACTORY (feature)) {
if (!f)
g_string_append_printf (json, ",");
g_string_append_printf (json, "\"%s\": {}", GST_OBJECT_NAME (feature));
f = FALSE;
}
}
g_string_append (json, "}}");
gst_plugin_feature_list_free (features);
}
g_string_append_c (json, '}');

View file

@ -132,13 +132,28 @@ foreach lib: libs
)]
endforeach
plugins_doc = [hotdoc.generate_doc('GStreamer-core-plugins',
project_version: apiversion,
sitemap: 'plugins/sitemap.txt',
index: 'plugins/index.md',
gst_index: 'plugins/index.md',
gst_smart_index: true,
gst_c_sources: ['../plugins/elements/*.c', '../plugins/elements/*.h'],
dependencies: [plugins_doc_dep],
gst_cache_file: plugins_cache,
)]
plugins_doc = [
hotdoc.generate_doc('coreelements',
project_version: apiversion,
sitemap: 'plugins/sitemap.txt',
index: 'plugins/index.md',
gst_index: 'plugins/index.md',
gst_smart_index: true,
gst_c_sources: ['../plugins/elements/*.c', '../plugins/elements/*.h'],
dependencies: [plugins_doc_dep],
gst_cache_file: plugins_cache,
gst_plugin_name: 'coreelements',
),
hotdoc.generate_doc('coretracers',
project_version: apiversion,
sitemap: 'plugins/sitemap.txt',
index: 'plugins/blank.md',
gst_index: 'plugins/blank.md',
gst_smart_index: true,
gst_c_sources: ['../plugins/tracers/*.c', '../plugins/tracers/*.h'],
dependencies: [plugins_doc_dep],
gst_cache_file: plugins_cache,
gst_plugin_name: 'coretracers',
)
]

0
docs/plugins/blank.md Normal file
View file

View file

@ -3028,6 +3028,7 @@
"license": "LGPL",
"package": "GStreamer git",
"source": "gstreamer",
"tracers": {},
"url": "Unknown package origin"
},
"coretracers": {
@ -3037,6 +3038,13 @@
"license": "LGPL",
"package": "GStreamer git",
"source": "gstreamer",
"tracers": {
"latency": {},
"leaks": {},
"log": {},
"rusage": {},
"stats": {}
},
"url": "Unknown package origin"
}
}

View file

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

View file

@ -19,13 +19,17 @@
* Boston, MA 02110-1301, USA.
*/
/**
* SECTION:element-leakstracer
* SECTION:tracer-leaks
* @short_description: detect GstObject and GstMiniObject leaks
*
* A tracing module tracking the lifetime of objects by logging those still
* alive when program is exiting and raising a warning.
* The type of objects tracked can be filtered using the parameters of the
* tracer, for example: GST_TRACERS=leaks(filters="GstEvent,GstMessage",stack-traces-flags=full)
* tracer, for example:
*
* ```
* GST_TRACERS=leaks(filters="GstEvent,GstMessage",stack-traces-flags=full)
* ```
*/
#ifdef HAVE_CONFIG_H

View file

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

View file

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

View file

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