Esempio n. 1
0
 def onArgvParserCreated(self, parser):
     parser.set_usage(usage)
     parsecamargs.addOptions(parser)
     parser.add_option("-l",
                       "--list",
                       dest="list",
                       action="store_true",
                       default=False,
                       help="lists informations about detected cameras")
     parser.add_option("-s",
                       "--noinfo",
                       dest="noinfo",
                       action="store_true",
                       default=False,
                       help="don't show any info overlayed on the screen")
     parser.add_option("-r",
                       "--resetbus",
                       dest="resetbus",
                       action="store_true",
                       default=False,
                       help="reset the firewire bus")
     parser.add_option(
         "-c",
         "--capture",
         dest="capture",
         action="store_true",
         default=False,
         help="Capture camera image to video file 'camera.mov'.")
 def onArgvParserCreated(self, parser):
     parser.set_usage(usage)
     parsecamargs.addOptions(parser)
     parser.add_option("-l", "--list", dest="list",
             action="store_true", default=False,
             help="lists informations about detected cameras")
     parser.add_option("-s", "--noinfo", dest="noinfo",
             action="store_true", default=False,
             help="don't show any info overlayed on the screen")
     parser.add_option("-r", "--resetbus", dest="resetbus",
             action="store_true", default=False,
             help="reset the firewire bus")
     parser.add_option("-c", "--capture", dest="capture",
             action="store_true", default=False,
             help="Capture camera image to video file 'camera.mov'.")
Esempio n. 3
0
import time
from libavg import avg
from libavg import parsecamargs
from libavg import AVGApp

g_Log = avg.Logger.get()
g_Player = avg.Player.get()

usage = """%prog [options]

avg_showcamera.py shows the images captured by a camera attached to the
system. Its main use is to find out which parameters - device names,
image formats, framerates, etc. can be used with the camera(s)."""

parser = optparse.OptionParser(usage=usage)
parsecamargs.addOptions(parser)
parser.add_option("-l", "--list", dest="list", action="store_true", default=False,
          help="lists informations about detected cameras")
parser.add_option("-s", "--noinfo", dest="noinfo", action="store_true", default=False,
          help="don't show any info overlayed on the screen")
parser.add_option("-r", "--resetbus", dest="resetbus", action="store_true", default=False,
          help="reset the firewire bus.")

(g_options, g_args) = parser.parse_args()

if g_options.list:
    infoList = list()
    infoList = avg.CameraNode.getCamerasInfos()
    if (len(infoList) <= 0):
        print "No camera available!"
    for info in infoList:
Esempio n. 4
0
 def onArgvParserCreated(self, parser):
     parser.set_usage(usage)
     parsecamargs.addOptions(parser)
Esempio n. 5
0
 def onArgvParserCreated(self, parser):
     parser.set_usage(usage)
     parsecamargs.addOptions(parser)