forked from Github/frigate
Limit shm frame count (#12363)
* Limited shm frame count (#12346) * Only keep 2x detect fps frames in SHM * Don't delete previous shm frames in output * Catch case where images do not exist * Ensure files are closed * Clear out all frames when shutting down * Correct the number of frames saved * Simplify empty shm error handling * Improve frame safety * Add handler logs when frame is None * Don't fail on cleanup * Cleanup logging * Update docs * Update calculation * Restore condition * Fix case where thumbnail is saved without frame * Adjust debug logs * Calculate best shm frame count * Fix shm count calculation * Catch missing frame * Formatting * Clarify docs * Catch none frame in autotracking
This commit is contained in:
@@ -78,9 +78,11 @@ class EmbeddingMaintainer(threading.Thread):
|
||||
try:
|
||||
frame_id = f"{camera}{data['frame_time']}"
|
||||
yuv_frame = self.frame_manager.get(frame_id, camera_config.frame_shape_yuv)
|
||||
data["thumbnail"] = self._create_thumbnail(yuv_frame, data["box"])
|
||||
self.tracked_events[data["id"]].append(data)
|
||||
self.frame_manager.close(frame_id)
|
||||
|
||||
if yuv_frame is not None:
|
||||
data["thumbnail"] = self._create_thumbnail(yuv_frame, data["box"])
|
||||
self.tracked_events[data["id"]].append(data)
|
||||
self.frame_manager.close(frame_id)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user