mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 04:35:25 +03:00
Formatting
This commit is contained in:
parent
9091fc4c4a
commit
3f55acd6e0
@ -201,17 +201,12 @@ class PreviewRecorder:
|
||||
frame_time: float,
|
||||
) -> bool:
|
||||
"""Decide if this frame should be added to PREVIEW."""
|
||||
active_objs = get_active_objects(frame_time, self.config, current_tracked_objects)
|
||||
|
||||
preview_output_fps = (
|
||||
2
|
||||
if any(
|
||||
o["label"] == "car"
|
||||
for o in active_objs
|
||||
)
|
||||
else 1
|
||||
active_objs = get_active_objects(
|
||||
frame_time, self.config, current_tracked_objects
|
||||
)
|
||||
|
||||
preview_output_fps = 2 if any(o["label"] == "car" for o in active_objs) else 1
|
||||
|
||||
# limit output to 1 fps
|
||||
if (frame_time - self.last_output_time) < 1 / preview_output_fps:
|
||||
return False
|
||||
|
||||
Loading…
Reference in New Issue
Block a user