fix frame build up latency by adding max size to every queue

This commit is contained in:
Prohurtz committed 2024-01-02 09:03:31 -08:00
1 parent fcb0cc4102
commit 2e7b42e5af
5 files changed
+14 -7

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
<option name="description" value="" />
</component>
</project>
+1 -1
View File
@@ -116,7 +116,7 @@ class AlgoSettingsWidget:
self.cancellation_event = Event() # Set the event until start is called, otherwise we can block if shutdown is called.
self.cancellation_event.set()
self.image_queue = Queue()
self.image_queue = Queue(maxsize=1)
def started(self):
+1 -1
View File
@@ -95,7 +95,7 @@ def main():
# Check to see if we have an ROI. If not, bring up ROI finder GUI.
# Spawn worker threads
osc_queue: queue.Queue[tuple[bool, int, int]] = queue.Queue()
osc_queue: queue.Queue[tuple[bool, int, int]] = queue.Queue(maxsize=5)
osc = VRChatOSC(cancellation_event, osc_queue, config)
osc_thread = threading.Thread(target=osc.run)
# start worker threads
+4 -4
View File
@@ -51,10 +51,10 @@ class CameraWidget:
# Set the event until start is called, otherwise we can block if shutdown is called.
self.cancellation_event.set()
self.capture_event = Event()
self.capture_queue = Queue()
self.roi_queue = Queue()
self.capture_queue = Queue(maxsize=1)
self.roi_queue = Queue(maxsize=1)
self.image_queue = Queue()
self.image_queue = Queue(maxsize=1)
self.ransac = BabbleProcessor(
self.config,
@@ -67,7 +67,7 @@ class CameraWidget:
self.cam_id,
)
self.camera_status_queue = Queue()
self.camera_status_queue = Queue(maxsize=1)
self.camera = Camera(
self.config,
0,
+1 -1
View File
@@ -155,7 +155,7 @@ class SettingsWidget:
self.cancellation_event = Event() # Set the event until start is called, otherwise we can block if shutdown is called.
self.cancellation_event.set()
self.image_queue = Queue()
self.image_queue = Queue(maxsize=1)
def started(self):