def showWidget(self, show): if self.videoPreview: PluginVideoWorker.setPreviewForDevice(self.recParams, None, 7) self.vboxlayout.removeWidget(self.videoPreview) self.videoPreview.setParent(None) self.videoPreview=None elif show: self.videoPreview=PluginVideoWorker.VideoPreview() self.vboxlayout.addWidget(self.videoPreview) PluginVideoWorker.setPreviewForDevice(self.recParams, self.videoPreview, 7)
def closeEvent(self, event): PluginVideoWorker.stopRecording() event.accept()
def startStopRecording(self, start): if start: PluginVideoWorker.startRecording(self.rp) #here we would need to restart previews (for scenario recordingOn+previewOn+recordingOff+recordingOn) else: PluginVideoWorker.stopRecording()
def timerEvent(self, event): if event.timerId()==self.statusPollTimer: self.checkBox2.setChecked(PluginVideoWorker.isDeviceBeingRecorded(self.recParams.device))
def setRecordingParams(self, rp): self.rp=rp def startStopRecording(self, start): if start: PluginVideoWorker.startRecording(self.rp) #here we would need to restart previews (for scenario recordingOn+previewOn+recordingOff+recordingOn) else: PluginVideoWorker.stopRecording() def closeEvent(self, event): PluginVideoWorker.stopRecording() event.accept() PluginVideoWorker.initializeVideo() if len(sys.argv)==1: devIdxs=[0] else: if sys.argv[1]=="list": for dev in PluginVideoWorker.getDevices(): print dev, ":", devCap=PluginVideoWorker.getDeviceCapabilities(dev) for mod in devCap.modes: print mod.width, mod.height, "@", mod.fps, ";", print PluginVideoWorker.uninitializeVideo() exit()