docs: Generate ges plugin doc
authorThibault Saunier <tsaunier@igalia.com>
Thu, 6 Jun 2019 19:40:57 +0000 (15:40 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Fri, 5 Jul 2019 21:52:50 +0000 (17:52 -0400)
docs/meson.build
docs/nle-index.md [deleted file]
docs/nle-sitemap.txt [deleted file]
docs/nle.md [deleted file]
docs/plugins/index.md [new file with mode: 0644]
docs/plugins/nle.md [new file with mode: 0644]
docs/plugins/sitemap.txt [new file with mode: 0644]
meson.build
plugins/ges/gessrc.c
plugins/nle/nleoperation.c

index 54f832301245aaef90c1d1cac7772f1982077aa6..b7a576034a338daf06c31d848d5f6beaa6036fa2 100644 (file)
@@ -89,17 +89,31 @@ libs_doc = [hotdoc.generate_doc('gst-editing-services',
     disable_incremental_build: true,
 )]
 
-plugins_doc = [hotdoc.generate_doc('nle',
-    project_version: apiversion,
-    extra_assets: [join_paths(meson.current_source_dir(), 'images')],
-    sitemap: 'nle-sitemap.txt',
-    index: 'nle-index.md',
-    dependencies: [nle],
-    disable_incremental_build: true,
-    gst_order_generated_subpages: true,
-    gst_index: 'nle-index.md',
-    gst_c_sources: ['../../plugins/nle/*.[ch]'],
-    gst_smart_index: true,
-    gst_cache_file: plugins_cache,
-    gst_plugin_name: 'nle',
-)]
+plugins_doc = []
+list_plugin_res = run_command(python3, '-c',
+'''
+import sys
+import json
+
+with open("@0@") as f:
+    print(':'.join(json.load(f).keys()), end='')
+'''.format(plugins_cache))
+
+assert(list_plugin_res.returncode() == 0,
+  'Could not list plugins from @0@\n@1@\n@1@'.format(plugins_cache, list_plugin_res.stdout(), list_plugin_res.stderr()))
+
+
+foreach plugin_name: list_plugin_res.stdout().split(':')
+    plugins_doc += [hotdoc.generate_doc(plugin_name,
+        project_version: apiversion,
+        sitemap: 'plugins/sitemap.txt',
+        index: 'plugins/index.md',
+        gst_index: 'plugins/index.md',
+        gst_smart_index: true,
+        gst_c_sources: ['../plugins/*/*.[ch]',],
+        dependencies: [gst_dep, plugins],
+        gst_order_generated_subpages: true,
+        gst_cache_file: plugins_cache,
+        gst_plugin_name: plugin_name,
+    )]
+endforeach
diff --git a/docs/nle-index.md b/docs/nle-index.md
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/docs/nle-sitemap.txt b/docs/nle-sitemap.txt
deleted file mode 100644 (file)
index d82d519..0000000
+++ /dev/null
@@ -1 +0,0 @@
-gst-index
\ No newline at end of file
diff --git a/docs/nle.md b/docs/nle.md
deleted file mode 100644 (file)
index 97b8968..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
----
-short-description: Non Linear Engine
-...
-
-# Non Linear Engine
-
-NLE is a set of elements to implement Non Linear multimedia editing.
diff --git a/docs/plugins/index.md b/docs/plugins/index.md
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/plugins/nle.md b/docs/plugins/nle.md
new file mode 100644 (file)
index 0000000..97b8968
--- /dev/null
@@ -0,0 +1,7 @@
+---
+short-description: Non Linear Engine
+...
+
+# Non Linear Engine
+
+NLE is a set of elements to implement Non Linear multimedia editing.
diff --git a/docs/plugins/sitemap.txt b/docs/plugins/sitemap.txt
new file mode 100644 (file)
index 0000000..d82d519
--- /dev/null
@@ -0,0 +1 @@
+gst-index
\ No newline at end of file
index 4c26a8dd2a5759f2c6d69143f2e659c0ed5a1d64..84e7554ca748fb9d03c6c88386af657ec15150e7 100644 (file)
@@ -173,6 +173,7 @@ foreach extra_arg : warning_flags
   endif
 endforeach
 
+python3 = import('python').find_installation()
 configinc = include_directories('.')
 subdir('ges')
 subdir('plugins')
@@ -209,7 +210,6 @@ else:
         prefix, 'Lib', 'Python%d%d' % (version.major, version.minor),
         'site-packages', 'gi', 'overrides'))
 '''
-python3 = import('python').find_installation()
 pygi_override_dir = get_option('pygi-overrides-dir')
 if pygi_override_dir == ''
     cres = run_command(python3, '-c', override_detector, get_option('prefix'))
index 2eb574d2581ce22a28f9a77fabdff186048bda35..e320b2c9c43ab3b8a201e1fe64ca913009b190f6 100644 (file)
@@ -20,7 +20,7 @@
  *
 
  **
- * SECTION:gessrc
+ * SECTION:element-gessrc
  * @short_description: A GstBin subclasses use to use GESTimeline
  * as sources inside any GstPipeline.
  * @see_also: #GESTimeline
index 5dec1059679706c156790ee92a548bada0dc68ca..ee00ab5068c638568e6da1bb61c4c803b48fae45 100644 (file)
@@ -29,7 +29,7 @@
  * SECTION:element-nleoperation
  *
  * A NleOperation performs a transformation or mixing operation on the
- * data from one or more #NleSources, which is used to implement filters or 
+ * data from one or more #NleSources, which is used to implement filters or
  * effects.
  */
 
@@ -131,7 +131,7 @@ nle_operation_class_init (NleOperationClass * klass)
    *
    * Specifies the number of sink pads the operation should provide.
    * If the sinks property is -1 (the default) pads are only created as
-   * demanded via get_request_pad() calls on the element.
+   * demanded via `get_request_pad()` calls on the element.
    */
   g_object_class_install_property (gobject_class, ARG_SINKS,
       g_param_spec_int ("sinks", "Sinks",
@@ -306,7 +306,7 @@ get_src_pad (GstElement * element)
 }
 
 /* get_nb_static_sinks:
- * 
+ *
  * Returns : The number of static sink pads of the controlled element.
  */
 static guint