mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 03:35:26 +03:00
Fix timing error
This commit is contained in:
parent
cd35481e92
commit
e36cabe724
@ -406,6 +406,7 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def run(self) -> None:
|
def run(self) -> None:
|
||||||
|
camera_count = len(self.config.cameras.keys())
|
||||||
# Check for new files every 5 seconds
|
# Check for new files every 5 seconds
|
||||||
wait_time = 0.0
|
wait_time = 0.0
|
||||||
while not self.stop_event.wait(wait_time):
|
while not self.stop_event.wait(wait_time):
|
||||||
@ -421,7 +422,7 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
current_tracked_objects,
|
current_tracked_objects,
|
||||||
motion_boxes,
|
motion_boxes,
|
||||||
regions,
|
regions,
|
||||||
) = self.object_recordings_info_queue.get(True, timeout=0.1)
|
) = self.object_recordings_info_queue.get(True, timeout=0.01)
|
||||||
|
|
||||||
if frame_time < run_start - stale_frame_count_threshold:
|
if frame_time < run_start - stale_frame_count_threshold:
|
||||||
stale_frame_count += 1
|
stale_frame_count += 1
|
||||||
@ -437,7 +438,7 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
)
|
)
|
||||||
except queue.Empty:
|
except queue.Empty:
|
||||||
q_size = self.object_recordings_info_queue.qsize()
|
q_size = self.object_recordings_info_queue.qsize()
|
||||||
if q_size > 5:
|
if q_size > camera_count:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"object_recordings_info loop queue not empty ({q_size}) - recording segments may be missing"
|
f"object_recordings_info loop queue not empty ({q_size}) - recording segments may be missing"
|
||||||
)
|
)
|
||||||
@ -458,7 +459,7 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
camera,
|
camera,
|
||||||
frame_time,
|
frame_time,
|
||||||
dBFS,
|
dBFS,
|
||||||
) = self.audio_recordings_info_queue.get(True, timeout=0.1)
|
) = self.audio_recordings_info_queue.get(True, timeout=0.01)
|
||||||
|
|
||||||
if frame_time < run_start - stale_frame_count_threshold:
|
if frame_time < run_start - stale_frame_count_threshold:
|
||||||
stale_frame_count += 1
|
stale_frame_count += 1
|
||||||
@ -472,7 +473,7 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
)
|
)
|
||||||
except queue.Empty:
|
except queue.Empty:
|
||||||
q_size = self.audio_recordings_info_queue.qsize()
|
q_size = self.audio_recordings_info_queue.qsize()
|
||||||
if q_size > 5:
|
if q_size > camera_count:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"object_recordings_info loop audio queue not empty ({q_size}) - recording segments may be missing"
|
f"object_recordings_info loop audio queue not empty ({q_size}) - recording segments may be missing"
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user