forked from Github/frigate
Add RTMP and timestamp style to global config (#1674)
* :memo::white_check_mark:🔧 - Make RTMP config global Fixes #1671 * :memo::white_check_mark:🔧 - Make timestamp style config global Fixes #1656 * fix test function names * formatter Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
This commit is contained in:
@@ -432,7 +432,7 @@ class CameraMqttConfig(BaseModel):
|
||||
)
|
||||
|
||||
|
||||
class CameraRtmpConfig(BaseModel):
|
||||
class RtmpConfig(BaseModel):
|
||||
enabled: bool = Field(default=True, title="RTMP restreaming enabled.")
|
||||
|
||||
|
||||
@@ -454,8 +454,8 @@ class CameraConfig(BaseModel):
|
||||
record: RecordConfig = Field(
|
||||
default_factory=RecordConfig, title="Record configuration."
|
||||
)
|
||||
rtmp: CameraRtmpConfig = Field(
|
||||
default_factory=CameraRtmpConfig, title="RTMP restreaming configuration."
|
||||
rtmp: RtmpConfig = Field(
|
||||
default_factory=RtmpConfig, title="RTMP restreaming configuration."
|
||||
)
|
||||
live: CameraLiveConfig = Field(
|
||||
default_factory=CameraLiveConfig, title="Live playback settings."
|
||||
@@ -656,6 +656,9 @@ class FrigateConfig(BaseModel):
|
||||
snapshots: SnapshotsConfig = Field(
|
||||
default_factory=SnapshotsConfig, title="Global snapshots configuration."
|
||||
)
|
||||
rtmp: RtmpConfig = Field(
|
||||
default_factory=RtmpConfig, title="Global RTMP restreaming configuration."
|
||||
)
|
||||
birdseye: BirdseyeConfig = Field(
|
||||
default_factory=BirdseyeConfig, title="Birdseye configuration."
|
||||
)
|
||||
@@ -672,6 +675,10 @@ class FrigateConfig(BaseModel):
|
||||
default_factory=DetectConfig, title="Global object tracking configuration."
|
||||
)
|
||||
cameras: Dict[str, CameraConfig] = Field(title="Camera configuration.")
|
||||
timestamp_style: TimestampStyleConfig = Field(
|
||||
default_factory=TimestampStyleConfig,
|
||||
title="Global timestamp style configuration.",
|
||||
)
|
||||
|
||||
@property
|
||||
def runtime_config(self) -> FrigateConfig:
|
||||
@@ -687,10 +694,12 @@ class FrigateConfig(BaseModel):
|
||||
include={
|
||||
"record": ...,
|
||||
"snapshots": ...,
|
||||
"rtmp": ...,
|
||||
"objects": ...,
|
||||
"motion": ...,
|
||||
"detect": ...,
|
||||
"ffmpeg": ...,
|
||||
"timestamp_style": ...,
|
||||
},
|
||||
exclude_unset=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user