Commit 3fa2c9e3 authored by Matthew Waters's avatar Matthew Waters

docs: add support for documenting tracer plugins

Adds the necessary xsl templates for tracer's based entirely on the
existing element template

https://bugzilla.gnome.org/show_bug.cgi?id=791253
parent e8c7a71b
......@@ -295,6 +295,7 @@ get_object_types (void)
g_warning ("Could not load plugin feature %s",
gst_plugin_feature_get_name (feature));
}
factories = g_list_prepend (factories, feature);
if (GST_IS_ELEMENT_FACTORY (feature)) {
const gchar *pad_dir[] = { "unknown","source","sink" };
......@@ -304,7 +305,6 @@ get_object_types (void)
$debug_log (" feature: %s", gst_plugin_feature_get_name (feature));
factory = GST_ELEMENT_FACTORY (feature);
factories = g_list_prepend (factories, factory);
if (reinspect) {
/* output element data */
......@@ -332,6 +332,16 @@ get_object_types (void)
g_list_free (pads);
fputs (" </pads>\\n </element>\\n", inspect);
}
} else if (GST_IS_TRACER_FACTORY (feature)) {
$debug_log (" feature: %s", gst_plugin_feature_get_name (feature));
if (reinspect) {
/* output element data */
fputs (" <tracer>\\n", inspect);
fputs (xmlprint(6, "name", gst_plugin_feature_get_name (feature)),inspect);
fputs (" </tracer>\\n", inspect);
}
}
features = g_list_next (features);
}
......@@ -354,14 +364,22 @@ get_object_types (void)
/* fill it */
while (l) {
factory = GST_ELEMENT_FACTORY (l->data);
type = gst_element_factory_get_element_type (factory);
const gchar *name = NULL;
type = 0;
if (GST_IS_ELEMENT_FACTORY (l->data)) {
factory = GST_ELEMENT_FACTORY (l->data);
type = gst_element_factory_get_element_type (factory);
name = gst_element_factory_get_metadata (factory, GST_ELEMENT_METADATA_LONGNAME);
} else if (GST_IS_TRACER_FACTORY (l->data)) {
GstTracerFactory *t = GST_TRACER_FACTORY (l->data);
type = gst_tracer_factory_get_tracer_type (t);
name = gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (t));
}
if (type != 0) {
$debug_log ("adding type for factory %s", gst_element_factory_get_metadata (factory, GST_ELEMENT_METADATA_LONGNAME));
$debug_log ("adding type for factory %s", name);
object_types[i++] = type;
} else {
g_message ("type info for factory %s not found",
gst_element_factory_get_metadata (factory, GST_ELEMENT_METADATA_LONGNAME));
g_message ("type info for factory %s not found", name);
}
l = g_list_next (l);
}
......
......@@ -111,6 +111,45 @@
</exsl:document>
</xsl:template>
<xsl:template match="tracer">
<xsl:element name="varlistentry">
<xsl:element name="term">
<xsl:element name="link">
<xsl:attribute name="linkend"><xsl:value-of select="$module" />-plugins-<xsl:value-of select="name"/>tracer</xsl:attribute>
<xsl:value-of select="name" />
</xsl:element>
</xsl:element>
<!--<xsl:element name="listitem">
<xsl:element name="simpara"><xsl:value-of select="description" /></xsl:element>
</xsl:element>-->
</xsl:element>
<xsl:variable name="name"><xsl:copy-of select="name"/></xsl:variable>
<exsl:document href="{concat ('xml/tracer-', $name, '-details.xml')}" method="xml" indent="yes">
<xsl:element name="refsynopsisdiv">
<xsl:element name="refsect2">
<xsl:element name="title">Tracer Information</xsl:element>
<xsl:element name="variablelist">
<!-- plugin name and link -->
<xsl:element name="varlistentry">
<xsl:element name="term">plugin</xsl:element>
<xsl:element name="listitem">
<xsl:element name="simpara">
<xsl:element name="link">
<xsl:attribute name="linkend">plugin-<xsl:value-of select="../../name"/></xsl:attribute>
<xsl:value-of select="../../name" />
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element> <!-- variablelist -->
</xsl:element> <!-- refsect2 -->
</xsl:element> <!-- refsynopsisdiv -->
</exsl:document>
</xsl:template>
<xsl:template match="plugin">
<xsl:element name="refentry">
<xsl:attribute name="id"><xsl:value-of select="$module" />-plugins-plugin-<xsl:value-of select="name"/></xsl:attribute>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment