mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-12 14:15:22 +03:00
Update segment even when number of active objects is the same
This commit is contained in:
parent
b3eab17f2c
commit
684caf67ed
@ -242,6 +242,8 @@ 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:
|
||||||
|
should_update = False
|
||||||
|
|
||||||
if frame_time > segment.last_update:
|
if frame_time > segment.last_update:
|
||||||
segment.last_update = frame_time
|
segment.last_update = frame_time
|
||||||
|
|
||||||
@ -270,12 +272,16 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
)
|
)
|
||||||
):
|
):
|
||||||
segment.severity = SeverityEnum.alert
|
segment.severity = SeverityEnum.alert
|
||||||
|
should_update = True
|
||||||
|
|
||||||
# keep zones up to date
|
# keep zones up to date
|
||||||
if len(object["current_zones"]) > 0:
|
if len(object["current_zones"]) > 0:
|
||||||
segment.zones.update(object["current_zones"])
|
segment.zones.update(object["current_zones"])
|
||||||
|
|
||||||
if len(active_objects) > segment.frame_active_count:
|
if len(active_objects) > segment.frame_active_count:
|
||||||
|
should_update = True
|
||||||
|
|
||||||
|
if should_update:
|
||||||
try:
|
try:
|
||||||
frame_id = f"{camera_config.name}{frame_time}"
|
frame_id = f"{camera_config.name}{frame_time}"
|
||||||
yuv_frame = self.frame_manager.get(
|
yuv_frame = self.frame_manager.get(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user