def __init__(self, width=320, height=240, fps=30): """ Starts the iSight camera with the given size. """ self._delegate = Camera._delegate.alloc().init() self._width = width self._height = height self._fps = fps self._time = 0 self._camera = CSGCamera.alloc().init() self._camera.startWithSize_((width, height)) self._camera.setDelegate_(self._delegate)
def __init__(self, size=(160,120)): self.camera = CSGCamera.alloc().init() self.camera.startWithSize_(size) self.size = size