mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
Add cleaning up the stream after cancellation_event was sent
This commit is contained in:
parent
9d3424d20f
commit
789879f3df
@ -41,6 +41,7 @@ class Camera:
|
||||
while True:
|
||||
if self.cancellation_event.is_set():
|
||||
print("Exiting capture thread")
|
||||
self.cleanup_stream()
|
||||
return
|
||||
|
||||
# If things aren't open, retry until they are. Don't let read requests come in any earlier
|
||||
@ -113,4 +114,4 @@ class Camera:
|
||||
if qsize > 1:
|
||||
print(f"CAPTURE QUEUE BACKPRESSURE OF {qsize}. CHECK FOR CRASH OR TIMING ISSUES IN ALGORITHM.")
|
||||
self.camera_output_outgoing.put((image, frame_number, fps))
|
||||
self.capture_event.clear()
|
||||
self.capture_event.clear()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user