(self, path, transform=None, queue_size=128)
| 15 | |
| 16 | class FileVideoStream: |
| 17 | def __init__(self, path, transform=None, queue_size=128): |
| 18 | # initialize the file video stream along with the boolean |
| 19 | # used to indicate if the thread should be stopped or not |
| 20 | self.stream = cv2.VideoCapture(path) |
| 21 | self.stopped = False |
| 22 | self.transform = transform |
| 23 | |
| 24 | # initialize the queue used to store frames read from |
| 25 | # the video file |
| 26 | self.Q = Queue(maxsize=queue_size) |
| 27 | # intialize thread |
| 28 | self.thread = Thread(target=self.update, args=()) |
| 29 | self.thread.daemon = True |
| 30 | |
| 31 | def start(self): |
| 32 | # start a thread to read frames from the file video stream |
nothing calls this directly
no outgoing calls
no test coverage detected