MCPcopy Create free account
hub / github.com/GStreamer/gst-python / main

Function main

old_examples/synchronizer.py:798–817  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

796 return True
797
798def main(args):
799 def usage():
800 sys.stderr.write("usage: %s [URI-OF-MEDIA-FILE]\n" % args[0])
801 return 1
802
803 w = PlayerWindow()
804 w.show()
805
806 if len(args) == 1:
807 if not w.do_choose_file():
808 return 1
809 elif len(args) == 2:
810 if not gst.uri_is_valid(args[1]):
811 sys.stderr.write("Error: Invalid URI: %s\n" % args[1])
812 return 1
813 w.load_file(args[1])
814 else:
815 return usage()
816
817 gtk.main()
818
819if __name__ == '__main__':
820 sys.exit(main(sys.argv))

Callers 1

synchronizer.pyFile · 0.70

Calls 4

do_choose_fileMethod · 0.95
load_fileMethod · 0.95
PlayerWindowClass · 0.70
usageFunction · 0.70

Tested by

no test coverage detected