From f13b4275c77f838f06895c33a267722055847f73 Mon Sep 17 00:00:00 2001 From: Murali Raju Date: Thu, 23 Jul 2020 13:55:31 -0400 Subject: [PATCH] Add thread name to filevideostream.py --- imutils/video/filevideostream.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/imutils/video/filevideostream.py b/imutils/video/filevideostream.py index f173eb5..66eb446 100644 --- a/imutils/video/filevideostream.py +++ b/imutils/video/filevideostream.py @@ -14,18 +14,21 @@ class FileVideoStream: - def __init__(self, path, transform=None, queue_size=128): + def __init__(self, path, transform=None, queue_size=128, name="FileVideoStream"): # initialize the file video stream along with the boolean # used to indicate if the thread should be stopped or not self.stream = cv2.VideoCapture(path) self.stopped = False self.transform = transform + # initialize the thread name + self.name = name + # initialize the queue used to store frames read from # the video file self.Q = Queue(maxsize=queue_size) # intialize thread - self.thread = Thread(target=self.update, args=()) + self.thread = Thread(target=self.update, name=self.name, args=()) self.thread.daemon = True def start(self):