ContentConsumer.py 文件源码

python
阅读 52 收藏 0 点赞 0 评论 0

项目:PyPPSPP 作者: justas- 项目源码 文件源码
def thread_entry(self):
        """Entry point for consumption happening in the thread"""

        try:
            # Keep beffering for some time
            self._buffer_start = time.time()
            while self._q.qsize() < self._video_buffer_sz and not self._stop_thread:
                logging.info('Buffering. Q: %s', self._q.qsize())
                time.sleep(0.25)

            # Set the start time
            self._start_time = time.time()

            # Run until requested to stop
            while not self._stop_thread:
                self.__consume()
                time.sleep(1 / self._fps)

            # When stopped - indicate stop time
            self._stop_time = time.time()
            return

        except KeyboardInterrupt:
            logging.warn('Except in consume thread!')
            pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号