def read(self): if escapi.is_capture_done(self.device): image = escapi.read(self.device, self.width, self.height, self.buffer) escapi.do_capture(self.device) return True, image else: return False, None
def read(self): if self.device is None: return super(CameraReader, self).read() if escapi.is_capture_done(self.device): image = escapi.read(self.device, self.width, self.height, self.buffer) escapi.do_capture(self.device) return True, image else: return False, None
def is_ready(self): if self.device is None: return super(CameraReader, self).is_ready() return escapi.is_capture_done(self.device)
def is_ready(self): return escapi.is_capture_done(self.device)