mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 19:17:41 +03:00
Handle updating objects config
This commit is contained in:
parent
8cf418cf1e
commit
3572ef127e
@ -17,6 +17,7 @@ class CameraConfigUpdateEnum(str, Enum):
|
|||||||
enabled = "enabled"
|
enabled = "enabled"
|
||||||
motion = "motion" # includes motion and motion masks
|
motion = "motion" # includes motion and motion masks
|
||||||
notifications = "notifications"
|
notifications = "notifications"
|
||||||
|
objects = "objects"
|
||||||
record = "record"
|
record = "record"
|
||||||
review = "review"
|
review = "review"
|
||||||
snapshots = "snapshots"
|
snapshots = "snapshots"
|
||||||
@ -83,6 +84,8 @@ class CameraConfigUpdateSubscriber:
|
|||||||
config.motion = updated_config
|
config.motion = updated_config
|
||||||
elif update_type == CameraConfigUpdateEnum.notifications:
|
elif update_type == CameraConfigUpdateEnum.notifications:
|
||||||
config.notifications = updated_config
|
config.notifications = updated_config
|
||||||
|
elif update_type == CameraConfigUpdateEnum.objects:
|
||||||
|
config.objects = updated_config
|
||||||
elif update_type == CameraConfigUpdateEnum.record:
|
elif update_type == CameraConfigUpdateEnum.record:
|
||||||
config.record = updated_config
|
config.record = updated_config
|
||||||
elif update_type == CameraConfigUpdateEnum.review:
|
elif update_type == CameraConfigUpdateEnum.review:
|
||||||
|
|||||||
@ -494,8 +494,6 @@ def track_camera(
|
|||||||
frame_queue = camera_metrics.frame_queue
|
frame_queue = camera_metrics.frame_queue
|
||||||
|
|
||||||
frame_shape = config.frame_shape
|
frame_shape = config.frame_shape
|
||||||
objects_to_track = config.objects.track
|
|
||||||
object_filters = config.objects.filters
|
|
||||||
|
|
||||||
motion_detector = ImprovedMotionDetector(
|
motion_detector = ImprovedMotionDetector(
|
||||||
frame_shape,
|
frame_shape,
|
||||||
@ -528,8 +526,6 @@ def track_camera(
|
|||||||
object_tracker,
|
object_tracker,
|
||||||
detected_objects_queue,
|
detected_objects_queue,
|
||||||
camera_metrics,
|
camera_metrics,
|
||||||
objects_to_track,
|
|
||||||
object_filters,
|
|
||||||
stop_event,
|
stop_event,
|
||||||
ptz_metrics,
|
ptz_metrics,
|
||||||
region_grid,
|
region_grid,
|
||||||
@ -594,8 +590,6 @@ def process_frames(
|
|||||||
object_tracker: ObjectTracker,
|
object_tracker: ObjectTracker,
|
||||||
detected_objects_queue: Queue,
|
detected_objects_queue: Queue,
|
||||||
camera_metrics: CameraMetrics,
|
camera_metrics: CameraMetrics,
|
||||||
objects_to_track: list[str],
|
|
||||||
object_filters,
|
|
||||||
stop_event: MpEvent,
|
stop_event: MpEvent,
|
||||||
ptz_metrics: PTZMetrics,
|
ptz_metrics: PTZMetrics,
|
||||||
region_grid: list[list[dict[str, Any]]],
|
region_grid: list[list[dict[str, Any]]],
|
||||||
@ -608,6 +602,7 @@ def process_frames(
|
|||||||
CameraConfigUpdateEnum.detect,
|
CameraConfigUpdateEnum.detect,
|
||||||
CameraConfigUpdateEnum.enabled,
|
CameraConfigUpdateEnum.enabled,
|
||||||
CameraConfigUpdateEnum.motion,
|
CameraConfigUpdateEnum.motion,
|
||||||
|
CameraConfigUpdateEnum.objects,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -825,8 +820,8 @@ def process_frames(
|
|||||||
frame,
|
frame,
|
||||||
model_config,
|
model_config,
|
||||||
region,
|
region,
|
||||||
objects_to_track,
|
camera_config.objects.track,
|
||||||
object_filters,
|
camera_config.objects.filters,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user