Skip to content

Commit a751bf9

Browse files
2 parents 2002c70 + 9c9bb79 commit a751bf9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

BabbleApp/camera_widget.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ def __init__(self, widget_id: Tab, main_config: BabbleConfig, osc_queue: Queue):
5353
self.capture_event = Event()
5454
self.capture_queue = Queue(maxsize=2)
5555
self.roi_queue = Queue(maxsize=2)
56-
57-
self.image_queue = Queue(maxsize=2)
56+
self.image_queue = Queue(maxsize=500)
5857

5958
self.ransac = BabbleProcessor(
6059
self.config,
@@ -211,6 +210,11 @@ def stop(self):
211210
self.camera_thread.join()
212211

213212
def render(self, window, event, values):
213+
if self.image_queue.qsize() > 2:
214+
with self.image_queue.mutex:
215+
self.image_queue.queue.clear()
216+
else:
217+
pass
214218
changed = False
215219
# If anything has changed in our configuration settings, change/update those.
216220
if (

0 commit comments

Comments
 (0)