mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
gst-xmlinspect dumps the plugin info to an xml file xml2text.xsl performs an xsl transform on the xml to generate out...
Original commit message from CVS: gst-xmlinspect dumps the plugin info to an xml file xml2text.xsl performs an xsl transform on the xml to generate output similar to gst-inspect
This commit is contained in:
parent
e326f58193
commit
b3341eba46
3 changed files with 1267 additions and 0 deletions
|
@ -13,6 +13,7 @@ endif
|
|||
bin_PROGRAMS = gst-launch \
|
||||
$(GST_REGISTRY_SRC) \
|
||||
gst-inspect \
|
||||
gst-xmlinspect \
|
||||
$(GST_LOADSAVE_SRC) \
|
||||
gst-md5sum
|
||||
|
||||
|
@ -34,6 +35,10 @@ gst_inspect_LDADD = $(GST_LIBS) ../libs/gst/control/libgstcontrol-@GST_MAJORMINO
|
|||
gst_inspect_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
|
||||
-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\"
|
||||
|
||||
gst_xmlinspect_LDADD = $(GST_LIBS) ../libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
|
||||
gst_xmlinspect_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
|
||||
-DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\"
|
||||
|
||||
if !GST_DISABLE_REGISTRY
|
||||
gst_register_LDADD = $(GST_LIBS)
|
||||
gst_register_CFLAGS = $(GST_CFLAGS) -DGST_CONFIG_DIR=\"$(GST_CONFIG_DIR)\" \
|
||||
|
|
1062
tools/gst-xmlinspect.c
Normal file
1062
tools/gst-xmlinspect.c
Normal file
File diff suppressed because it is too large
Load diff
200
tools/xml2text.xsl
Normal file
200
tools/xml2text.xsl
Normal file
|
@ -0,0 +1,200 @@
|
|||
<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:template match="/element">
|
||||
<xsl:apply-templates select="name"/>
|
||||
<xsl:apply-templates select="details"/>
|
||||
<xsl:apply-templates select="object"/>
|
||||
<xsl:apply-templates select="pad-templates"/>
|
||||
<xsl:apply-templates select="element-flags"/>
|
||||
<xsl:apply-templates select="element-implementation"/>
|
||||
<xsl:apply-templates select="clocking-interaction"/>
|
||||
<xsl:apply-templates select="pads"/>
|
||||
<xsl:apply-templates select="element-properties"/>
|
||||
<xsl:apply-templates select="element-signals"/>
|
||||
<xsl:apply-templates select="element-actions"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="name">
|
||||
<xsl:text>Element Name: </xsl:text><xsl:value-of select="."/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="details">
|
||||
<xsl:text>Factory Details: </xsl:text>
|
||||
<xsl:text> Long Name:	</xsl:text> <xsl:value-of select="long-name"/> <xsl:text> </xsl:text>
|
||||
<xsl:text> Class:	</xsl:text> <xsl:value-of select="class"/> <xsl:text> </xsl:text>
|
||||
<xsl:text> License:	</xsl:text> <xsl:value-of select="license"/> <xsl:text> </xsl:text>
|
||||
<xsl:text> Description:	</xsl:text> <xsl:value-of select="description"/> <xsl:text> </xsl:text>
|
||||
<xsl:text> Version:	</xsl:text> <xsl:value-of select="version"/> <xsl:text> </xsl:text>
|
||||
<xsl:text> Author(s):	</xsl:text> <xsl:value-of select="authors"/> <xsl:text> </xsl:text>
|
||||
<xsl:text> Copyright:	</xsl:text> <xsl:value-of select="copyright"/> <xsl:text> </xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="object">
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="pad-templates">
|
||||
<xsl:text>Pad Templates </xsl:text>
|
||||
<xsl:apply-templates select="./pad-template"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="pad-template">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="direction"/>
|
||||
<xsl:text> template: </xsl:text>
|
||||
<xsl:value-of select="name"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:text> Availability: </xsl:text> <xsl:value-of select="presence"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:text> Capabilities: </xsl:text> <xsl:apply-templates select="./capscomp"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="capscomp">
|
||||
<xsl:apply-templates select="./caps"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="caps">
|
||||
<xsl:text> '</xsl:text>
|
||||
<xsl:value-of select="name"/>
|
||||
<xsl:text>' </xsl:text>
|
||||
<xsl:text> MIME type: </xsl:text>
|
||||
<xsl:value-of select="type"/>
|
||||
<xsl:text>' </xsl:text>
|
||||
<xsl:apply-templates select="./properties"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="properties">
|
||||
<xsl:apply-templates select="*"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text>	:List </xsl:text>
|
||||
<xsl:apply-templates select="*" mode="list"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- propety entries in list mode -->
|
||||
<xsl:template match="string" mode="list">
|
||||
<xsl:text> String: '</xsl:text>
|
||||
<xsl:value-of select="@value"/>
|
||||
<xsl:text>' </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fourcc" mode="list">
|
||||
<xsl:text> FourCC: '</xsl:text>
|
||||
<xsl:value-of select="@hexvalue"/>
|
||||
<xsl:text>' </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="int" mode="list">
|
||||
<xsl:text> Integer: </xsl:text>
|
||||
<xsl:value-of select="@value"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="range" mode="list">
|
||||
<xsl:text> Integer 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:text> : String: '</xsl:text>
|
||||
<xsl:value-of select="@value"/>
|
||||
<xsl:text>' </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fourcc">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text> : FourCC: '</xsl:text>
|
||||
<xsl:value-of select="@hexvalue"/>
|
||||
<xsl:text>' </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="int">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text> : Integer: </xsl:text>
|
||||
<xsl:value-of select="@value"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="range">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text> : Integer 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:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="element-flags">
|
||||
<xsl:text>Element Flags: </xsl:text>
|
||||
<xsl:apply-templates select="./flag"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="state-change">
|
||||
<xsl:text> Has change_state() function: </xsl:text>
|
||||
<xsl:value-of select="@function"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="load">
|
||||
<xsl:text> Has custom restore_thyself() function: </xsl:text>
|
||||
<xsl:value-of select="@function"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="save">
|
||||
<xsl:text> Has custom save_thyself() function: </xsl:text>
|
||||
<xsl:value-of select="@function"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="element-implementation">
|
||||
<xsl:text>Element Implementation: </xsl:text>
|
||||
<xsl:apply-templates select="*"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="clocking-interaction">
|
||||
<xsl:text>Clocking Interaction: </xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="pads">
|
||||
<xsl:text>Pads: </xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="element-properties">
|
||||
<xsl:text>Element Arguments: </xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="element-signals">
|
||||
<xsl:text>Element Signals: </xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="element-actions">
|
||||
<xsl:text>Element Actions: </xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
Loading…
Reference in a new issue