mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
Dynamic Config Updates (#18353)
* Create classes to handle publishing and subscribing config updates * Cleanup * Use config updater * Update handling for enabled config * Cleanup * Recording config updates * Birdseye config updates * Handle notifications * handle review * Update motion
This commit is contained in:
committed by
Blake Blackshear
parent
b7dbcce6e5
commit
dc187eee1c
@@ -13,7 +13,6 @@ from typing import Any
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
from frigate.comms.config_updater import ConfigSubscriber
|
||||
from frigate.comms.inter_process import InterProcessRequestor
|
||||
from frigate.config import CameraConfig, RecordQualityEnum
|
||||
from frigate.const import CACHE_DIR, CLIPS_DIR, INSERT_PREVIEW, PREVIEW_FRAME_TYPE
|
||||
@@ -174,9 +173,6 @@ class PreviewRecorder:
|
||||
|
||||
# create communication for finished previews
|
||||
self.requestor = InterProcessRequestor()
|
||||
self.config_subscriber = ConfigSubscriber(
|
||||
f"config/record/{self.config.name}", True
|
||||
)
|
||||
|
||||
y, u1, u2, v1, v2 = get_yuv_crop(
|
||||
self.config.frame_shape_yuv,
|
||||
@@ -323,12 +319,6 @@ class PreviewRecorder:
|
||||
) -> None:
|
||||
self.offline = False
|
||||
|
||||
# check for updated record config
|
||||
_, updated_record_config = self.config_subscriber.check_for_update()
|
||||
|
||||
if updated_record_config:
|
||||
self.config.record = updated_record_config
|
||||
|
||||
# always write the first frame
|
||||
if self.start_time == 0:
|
||||
self.start_time = frame_time
|
||||
|
||||
Reference in New Issue
Block a user