case G_TYPE_FLOAT:
{
GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param);
- PUT_STRING (pfx + 2, "<range min=\"%g\" max=\"%g\"/>",
+ PUT_STRING (pfx + 2, "<range min=\"%f\" max=\"%f\"/>",
pfloat->minimum, pfloat->maximum);
PUT_ESCAPED (pfx + 2, "default", g_strdup_value_contents (&value));
break;
GParamSpec** specs;
gint x;
+ PUT_START_TAG (pfx, "dyn-params");
+
if((dpman = gst_dpman_get_manager (element))) {
- PUT_START_TAG (pfx, "dyn-params");
specs = gst_dpman_list_dparam_specs (dpman);
for (x = 0; specs[x] != NULL; x++) {
- g_print (" %-20.20s: ", g_param_spec_get_name (specs[x]));
+ PUT_START_TAG (pfx + 1, "dyn-param");
+
+ PUT_ESCAPED (pfx + 2, "name", g_param_spec_get_name (specs[x]));
+ PUT_ESCAPED (pfx + 2, "type", g_type_name (specs[x]->value_type));
+ PUT_ESCAPED (pfx + 2, "nick", g_param_spec_get_nick (specs[x]));
+ PUT_ESCAPED (pfx + 2, "blurb", g_param_spec_get_blurb (specs[x]));
switch (G_PARAM_SPEC_VALUE_TYPE (specs[x])) {
case G_TYPE_INT64:
- g_print ("64 Bit Integer (Default %" G_GINT64_FORMAT ", Range %" G_GINT64_FORMAT " -> %" G_GINT64_FORMAT ")",
- ((GParamSpecInt64 *) specs[x])->default_value,
- ((GParamSpecInt64 *) specs[x])->minimum,
- ((GParamSpecInt64 *) specs[x])->maximum);
+ PUT_STRING (pfx + 2, "<range min=\"%"G_GINT64_FORMAT"\" max=\"%"G_GINT64_FORMAT"\"/>",
+ ((GParamSpecInt64 *) specs[x])->minimum,
+ ((GParamSpecInt64 *) specs[x])->maximum);
+ PUT_STRING (pfx + 2, "<default>%"G_GINT64_FORMAT"</default>",
+ ((GParamSpecInt64 *) specs[x])->default_value);
break;
case G_TYPE_INT:
- g_print ("Integer (Default %d, Range %d -> %d)",
- ((GParamSpecInt *) specs[x])->default_value,
- ((GParamSpecInt *) specs[x])->minimum,
- ((GParamSpecInt *) specs[x])->maximum);
+ PUT_STRING (pfx + 2, "<range min=\"%d\" max=\"%d\"/>",
+ ((GParamSpecInt *) specs[x])->minimum,
+ ((GParamSpecInt *) specs[x])->maximum);
+ PUT_STRING (pfx + 2, "<default>%d</default>",
+ ((GParamSpecInt *) specs[x])->default_value);
break;
case G_TYPE_FLOAT:
- g_print ("Float. Default: %-8.8s %15.7g\n", "",
- ((GParamSpecFloat *) specs[x])->default_value);
- g_print ("%-23.23s Range: %15.7g - %15.7g", "",
+ PUT_STRING (pfx + 2, "<range min=\"%f\" max=\"%f\"/>",
((GParamSpecFloat *) specs[x])->minimum,
((GParamSpecFloat *) specs[x])->maximum);
+ PUT_STRING (pfx + 2, "<default>%f</default>",
+ ((GParamSpecFloat *) specs[x])->default_value);
break;
default:
- g_print ("unknown %ld", G_PARAM_SPEC_VALUE_TYPE (specs[x]));
+ break;
}
- PUT_END_TAG (pfx, "dyn-params");
+ PUT_END_TAG (pfx + 1, "dyn-param");
}
g_free (specs);
}
+ PUT_END_TAG (pfx, "dyn-params");
}
static void
for (j = 0; j < n_params; j++) {
PUT_ESCAPED (pfx + 3, "type", g_type_name (param_types[j]));
}
- if (k == 0)
- PUT_ESCAPED (pfx + 3, "type", "gpointer");
PUT_END_TAG (pfx + 2, "params");
PUT_END_TAG (3, "implementation");
if (realpad->caps) {
- g_print (" Capabilities:\n");
- print_caps (realpad->caps, 8);
+ print_caps (realpad->caps, 3);
}
PUT_END_TAG (2, "pad");
}
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-<xsl:output method="text" encoding="us-ascii" omit-xml-declaration="yes" indent="no"/>
+ <xsl:output method="text" encoding="us-ascii" omit-xml-declaration="yes" indent="no"/>
+ <xsl:variable name="padding" select="string(' ')"/>
<xsl:template match="/element">
<xsl:apply-templates select="name"/>
<xsl:apply-templates select="element-implementation"/>
<xsl:apply-templates select="clocking-interaction"/>
<xsl:apply-templates select="indexing-capabilities"/>
- <xsl:apply-templates select="dyn-params"/>
<xsl:apply-templates select="pads"/>
<xsl:apply-templates select="element-properties"/>
+ <xsl:apply-templates select="dyn-params"/>
<xsl:apply-templates select="element-signals"/>
<xsl:apply-templates select="element-actions"/>
</xsl:template>
<xsl:text> </xsl:text>
</xsl:template>
+ <xsl:template name="object">
+ <xsl:param name="i"/>
+ <xsl:param name="j"/>
+ <xsl:if test="count($i/*) > 0">
+ <xsl:call-template name="object">
+ <xsl:with-param name="i" select="$i/object"/>
+ <xsl:with-param name="j" select="$j - 1"/>
+ </xsl:call-template>
+ <xsl:value-of select="substring ($padding, 1, $j * 6)"/>
+ <xsl:text> +----</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$i/@name"/>
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
<xsl:template match="object">
+ <xsl:call-template name="object">
+ <xsl:with-param name="i" select="."/>
+ <xsl:with-param name="j" select="count(.//object[(*)])"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="pad-templates">
<xsl:text> </xsl:text>
</xsl:template>
+ <xsl:template match="float" mode="list">
+ <xsl:text> Float: </xsl:text>
+ <xsl:value-of select="@value"/>
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="floatrange" mode="list">
+ <xsl:text> Float range: </xsl:text>
+ <xsl:value-of select="concat(@min, ' - ', @max)"/>
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
<!-- propety entries in normal mode -->
<xsl:template match="string">
<xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
+ <xsl:value-of select="substring (concat (@name, $padding), 1, 15)"/>
<xsl:text> : String: '</xsl:text>
<xsl:value-of select="@value"/>
<xsl:text>' </xsl:text>
<xsl:template match="fourcc">
<xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
+ <xsl:value-of select="substring (concat (@name, $padding), 1, 15)"/>
<xsl:text> : FourCC: '</xsl:text>
<xsl:value-of select="@hexvalue"/>
<xsl:text>' </xsl:text>
<xsl:template match="int">
<xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
+ <xsl:value-of select="substring (concat (@name, $padding), 1, 15)"/>
<xsl:text> : Integer: </xsl:text>
<xsl:value-of select="@value"/>
<xsl:text> </xsl:text>
<xsl:template match="range">
<xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>
+ <xsl:value-of select="substring (concat (@name, $padding), 1, 15)"/>
<xsl:text> : Integer range: </xsl:text>
<xsl:value-of select="concat(@min, ' - ', @max)"/>
<xsl:text> </xsl:text>
</xsl:template>
+ <xsl:template match="float">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="substring (concat (@name, $padding), 1, 15)"/>
+ <xsl:text> : Float: </xsl:text>
+ <xsl:value-of select="@value"/>
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="floatrange">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="substring (concat (@name, $padding), 1, 15)"/>
+ <xsl:text> : Float range: </xsl:text>
+ <xsl:value-of select="concat(@min, ' - ', @max)"/>
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
<xsl:template match="flag">
<xsl:text> </xsl:text>
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="dyn-params">
- <xsl:text> Dynamic Parameters: </xsl:text>
+ <xsl:text>Dynamic Parameters: </xsl:text>
<xsl:choose>
<xsl:when test="count(*) = 0">
<xsl:text> none </xsl:text>
</xsl:when>
<xsl:otherwise>
+ <xsl:apply-templates select="dyn-param"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
<xsl:text>. (Default </xsl:text>
<xsl:value-of select="."/>
<xsl:text>)</xsl:text>
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="range" mode="params">
+ <xsl:value-of select="substring ($padding, 1, 25)"/>
+ <xsl:text>Range : </xsl:text>
+ <xsl:value-of select="concat(@min, ' - ', @max)"/>
+ <xsl:text> </xsl:text>
</xsl:template>
- <xsl:template match="element-property">
+ <xsl:template match="element-property|dyn-param">
<xsl:text> </xsl:text>
- <xsl:value-of select="name"/>
- <xsl:text>:	 </xsl:text>
+ <xsl:value-of select="substring (concat(name, $padding), 1, 20)"/>
+ <xsl:text> : </xsl:text>
<xsl:value-of select="blurb"/>
<xsl:text> </xsl:text>
- <xsl:text> </xsl:text>
+ <xsl:value-of select="substring ($padding, 1, 25)"/>
<xsl:value-of select="type"/>
<xsl:apply-templates select="default"/>
- <xsl:text> </xsl:text>
+ <xsl:apply-templates select="range" mode="params"/>
</xsl:template>
<xsl:template match="params">
<xsl:for-each select="type">
- <xsl:text>, </xsl:text>
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="substring ($padding, 1, 25)"/>
+ <xsl:value-of select="substring ($padding, 1, 20)"/>
<xsl:value-of select="."/>
<xsl:text> arg</xsl:text>
<xsl:value-of select="position()"/>
</xsl:template>
<xsl:template match="signal">
- <xsl:text> "</xsl:text>
- <xsl:value-of select="name"/>
- <xsl:text>" :</xsl:text>
+ <xsl:value-of select="substring (concat('"', name, '"', $padding), 1, 25)"/>
<xsl:value-of select="return-type"/>
<xsl:text> user_function </xsl:text>
<xsl:value-of select="concat ('(', object-type, '* object')"/>
<xsl:otherwise>
<xsl:for-each select="signal">
<xsl:apply-templates select="."/>
- <xsl:text>, gpointer user_data); </xsl:text>
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="substring ($padding, 1, 25)"/>
+ <xsl:value-of select="substring ($padding, 1, 20)"/>
+ <xsl:text>gpointer user_data); </xsl:text>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>