PyQt+OpenCV 录制保存、播放视频(2)


    def run(self):
        with QMutexLocker(self.mutex):
            self.stoped = False
        while True:
            if self.stoped:
                return


            self.emit(SIGNAL(self.signal))
            time.sleep(0.04) #40毫秒发送一次信号,每秒25帧
   
    def stop(self):
        with QMutexLocker(self.mutex):
            self.stoped = True
       
    def isStoped(self):   
        with QMutexLocker(sellf.mutex):
            return self.stoped
 
if __name__ == "__main__" :
    app = QApplication(sys.argv)
    main = MainWindow()
    main.show()
    sys.exit(app.exec_())

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/b0b5431feda0643eb4d4a07a68014a5c.html