use gst.extend.discoverer for oxinfo
This commit is contained in:
parent
0f5252e7a7
commit
82ba870e29
2 changed files with 42 additions and 115 deletions
|
|
@ -16,18 +16,18 @@ if os.path.exists(os.path.join(root, 'oxgst')):
|
|||
from oxgst import Info
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
parser = OptionParser()
|
||||
parser.add_option('-f', '--format', dest='format', help='output format: cfg, json, xml default: cfg')
|
||||
(opts, args) = parser.parse_args()
|
||||
|
||||
if not args:
|
||||
parser.print_help()
|
||||
sys.exit()
|
||||
sys.exit(1)
|
||||
|
||||
inputFile = args[0]
|
||||
i = Info(inputFile)
|
||||
info = i.metadata
|
||||
if not os.path.exists(inputFile):
|
||||
sys.exit(1)
|
||||
info = Info(inputFile)
|
||||
if opts.format == 'xml':
|
||||
xml = ET.Element("gstinfo")
|
||||
el = ET.SubElement(xml, "path")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue