From: Thomas Vander Stichele Date: Sat, 3 Sep 2005 23:56:25 +0000 (+0000) Subject: common/: only inspect plugins for this given package require gst-python 0.9 X-Git-Tag: RELEASE-0_8_11~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21a728cae512ec8f2753f62ef69e4c286da76003;p=platform%2Fupstream%2Fgst-common.git common/: only inspect plugins for this given package require gst-python 0.9 Original commit message from CVS: * common/gst-xmlinspect.py: * common/gtk-doc-plugins.mak: only inspect plugins for this given package require gst-python 0.9 --- diff --git a/gst-xmlinspect.py b/gst-xmlinspect.py index 69268a4..897b987 100644 --- a/gst-xmlinspect.py +++ b/gst-xmlinspect.py @@ -8,6 +8,8 @@ used as part of the plugin documentation build import sys import os +import pygst +pygst.require('0.9') import gst INDENT_SIZE = 2 @@ -100,11 +102,19 @@ def output_plugin(plugin, indent=0): return offset + ("\n" + offset).join(block.split("\n")) def main(): - if sys.argv[1]: - os.chdir(sys.argv[1]) + if len(sys.argv) == 1: + sys.stderr.write("Please specify a source module to inspect") + sys.exit(1) + source = sys.argv[1] + + if len(sys.argv) > 2: + os.chdir(sys.argv[2]) all = gst.registry_pool_plugin_list() for plugin in all: + if plugin.get_source() != source: + continue + filename = "plugin-%s.xml" % plugin.get_name() handle = open(filename, "w") handle.write(output_plugin(plugin)) diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak index 5cb57a1..0c79c0c 100644 --- a/gtk-doc-plugins.mak +++ b/gtk-doc-plugins.mak @@ -119,7 +119,7 @@ inspect-update: # IFF the output changed; see gtkdoc-mktmpl inspect-build.stamp: inspect $(INSPECT_ENVIRONMENT) $(PYTHON) \ - $(top_srcdir)/common/gst-xmlinspect.py inspect + $(top_srcdir)/common/gst-xmlinspect.py $(PACKAGE) inspect $(INSPECT_ENVIRONMENT) $(PYTHON) \ $(top_srcdir)/common/mangle-tmpl.py tmpl echo -n "timestamp" > inspect.stamp