mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 21:25:24 +03:00
Only update frame time if it is older
This commit is contained in:
parent
bd70bf1c31
commit
d75756164a
@ -160,6 +160,7 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
active_objects = get_active_objects(frame_time, camera_config, objects)
|
active_objects = get_active_objects(frame_time, camera_config, objects)
|
||||||
|
|
||||||
if len(active_objects) > 0:
|
if len(active_objects) > 0:
|
||||||
|
if frame_time > segment.last_update:
|
||||||
segment.last_update = frame_time
|
segment.last_update = frame_time
|
||||||
|
|
||||||
# update type for this segment now that active objects are detected
|
# update type for this segment now that active objects are detected
|
||||||
@ -198,6 +199,7 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
segment.severity == SeverityEnum.signification_motion
|
segment.severity == SeverityEnum.signification_motion
|
||||||
and len(motion) >= THRESHOLD_MOTION_ACTIVITY
|
and len(motion) >= THRESHOLD_MOTION_ACTIVITY
|
||||||
):
|
):
|
||||||
|
if frame_time > segment.last_update:
|
||||||
segment.last_update = frame_time
|
segment.last_update = frame_time
|
||||||
else:
|
else:
|
||||||
if segment.severity == SeverityEnum.alert and frame_time > (
|
if segment.severity == SeverityEnum.alert and frame_time > (
|
||||||
@ -317,7 +319,9 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
motion_boxes,
|
motion_boxes,
|
||||||
)
|
)
|
||||||
elif topic == DetectionTypeEnum.audio and len(audio_detections) > 0:
|
elif topic == DetectionTypeEnum.audio and len(audio_detections) > 0:
|
||||||
|
if frame_time > current_segment.last_update:
|
||||||
current_segment.last_update = frame_time
|
current_segment.last_update = frame_time
|
||||||
|
|
||||||
current_segment.audio.update(audio_detections)
|
current_segment.audio.update(audio_detections)
|
||||||
else:
|
else:
|
||||||
if topic == DetectionTypeEnum.video:
|
if topic == DetectionTypeEnum.video:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user