attempt to fix regions in process key error

This commit is contained in:
Blake Blackshear 2020-01-16 17:32:01 -06:00
parent dc7eecebc6
commit 169603d3ff

View File

@ -93,6 +93,7 @@ class DetectedObjectsProcessor(threading.Thread):
self.camera.detected_objects[frame['frame_time']].append(obj)
with self.camera.regions_in_process_lock:
if frame['frame_time'] in self.camera.regions_in_process:
self.camera.regions_in_process[frame['frame_time']] -= 1
# print(f"{frame['frame_time']} remaining regions {self.camera.regions_in_process[frame['frame_time']]}")
@ -100,6 +101,8 @@ class DetectedObjectsProcessor(threading.Thread):
del self.camera.regions_in_process[frame['frame_time']]
# print(f"{frame['frame_time']} no remaining regions")
self.camera.finished_frame_queue.put(frame['frame_time'])
else:
self.camera.finished_frame_queue.put(frame['frame_time'])
# Thread that checks finished frames for clipped objects and sends back
# for processing if needed