docs: Add tracers support
authorThibault Saunier <tsaunier@igalia.com>
Fri, 31 May 2019 03:23:35 +0000 (23:23 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Fri, 31 May 2019 22:53:43 +0000 (18:53 -0400)
docs/gst-hotdoc-plugins-scanner.c
docs/meson.build
docs/plugins/blank.md [new file with mode: 0644]
docs/plugins/gst_plugins_cache.json
plugins/tracers/gstlatency.c
plugins/tracers/gstleaks.c
plugins/tracers/gstlog.c
plugins/tracers/gstrusage.c
plugins/tracers/gststats.c

index 69dfd0cc74ef50219c088b82adef473e1db72b46..d70d09f22980f7e5e2287012b421434295afb028 100644 (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, ",");
+        _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;
-        _add_element_details (json, feature);
       }
     }
     g_string_append (json, "}}");
+    gst_plugin_feature_list_free (features);
   }
 
   g_string_append_c (json, '}');
index 8684a41759fda346487b82dbcaaa416faa7bd245..cc7c4146fcbcbd7562bd6a7e089b1bd16e44cf65 100644 (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',
+    )
+
+]
diff --git a/docs/plugins/blank.md b/docs/plugins/blank.md
new file mode 100644 (file)
index 0000000..e69de29
index 4266cee2e77f87fff3d6b91068c2caa4daa8a88e..78162a7050d5aea0bfdd509b9b49df28f9257a56 100644 (file)
         "license": "LGPL",
         "package": "GStreamer git",
         "source": "gstreamer",
+        "tracers": {},
         "url": "Unknown package origin"
     },
     "coretracers": {
         "license": "LGPL",
         "package": "GStreamer git",
         "source": "gstreamer",
+        "tracers": {
+            "latency": {},
+            "leaks": {},
+            "log": {},
+            "rusage": {},
+            "stats": {}
+        },
         "url": "Unknown package origin"
     }
 }
\ No newline at end of file
index 634fbed13588285b6d1bcba73df9a4f2f82fe693..937891c233370f8b616219c231c9825fb14e9901 100644 (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
index f95b7c75bb2c888ed86b47369f93fe672b807e03..22a005a2f3d73a19282b8ae8300e7169a458dba3 100644 (file)
  * 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
index 06f3cdbb38bd787244255eb41256e477959c0559..e23133c0e5d9cdcb45656efbe33898365a6e3725 100644 (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.
index 9086f1edc66d4494af78df6a8760fc5f18f89773..cb3fc6a7a1bebc40c475df7080e2ae0290babb3d 100644 (file)
  * 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
index 7ca1eca3c321a3976d2b01c1867d71de3b4451bd..5fd135026771a17746388a92c504f40ee95868f6 100644 (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.