(self)
| 24 | return self |
| 25 | |
| 26 | def update(self): |
| 27 | # keep looping infinitely until the thread is stopped |
| 28 | while True: |
| 29 | # if the thread indicator variable is set, stop the thread |
| 30 | if self.stopped: |
| 31 | return |
| 32 | |
| 33 | # otherwise, read the next frame from the stream |
| 34 | (self.grabbed, self.frame) = self.stream.read() |
| 35 | |
| 36 | def read(self): |
| 37 | # return the frame most recently read |