(self)
| 84 | return self.more() or not self.stopped |
| 85 | |
| 86 | def more(self): |
| 87 | # return True if there are still frames in the queue. If stream is not stopped, try to wait a moment |
| 88 | tries = 0 |
| 89 | while self.Q.qsize() == 0 and not self.stopped and tries < 5: |
| 90 | time.sleep(0.1) |
| 91 | tries += 1 |
| 92 | |
| 93 | return self.Q.qsize() > 0 |
| 94 | |
| 95 | def stop(self): |
| 96 | # indicate that the thread should be stopped |