forked from Github/frigate
Allow birdseye to be overridden at the camera level (#3083)
* Add camera level processing for birdseye * Add camera level birdseye configruation * Propogate birdseye from global * Update docs to show that birdseye is overridable * Fix incorrect default factory * Update note to indicate values that can be overridden * Cleanup config accessing * Add tests for birdseye config behavior * Fix mistake on test format * Update tests
This commit is contained in:
@@ -324,6 +324,13 @@ class BirdseyeConfig(FrigateBaseModel):
|
||||
)
|
||||
|
||||
|
||||
class BirdseyeCameraConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(default=True, title="Enable birdseye view for camera.")
|
||||
mode: BirdseyeModeEnum = Field(
|
||||
default=BirdseyeModeEnum.objects, title="Tracking mode for camera."
|
||||
)
|
||||
|
||||
|
||||
FFMPEG_GLOBAL_ARGS_DEFAULT = ["-hide_banner", "-loglevel", "warning"]
|
||||
FFMPEG_INPUT_ARGS_DEFAULT = [
|
||||
"-avoid_negative_ts",
|
||||
@@ -539,6 +546,9 @@ class CameraConfig(FrigateBaseModel):
|
||||
detect: DetectConfig = Field(
|
||||
default_factory=DetectConfig, title="Object detection configuration."
|
||||
)
|
||||
birdseye: BirdseyeCameraConfig = Field(
|
||||
default_factory=BirdseyeCameraConfig, title="Birdseye camera configuration."
|
||||
)
|
||||
timestamp_style: TimestampStyleConfig = Field(
|
||||
default_factory=TimestampStyleConfig, title="Timestamp style configuration."
|
||||
)
|
||||
@@ -775,6 +785,7 @@ class FrigateConfig(FrigateBaseModel):
|
||||
# Global config to propegate down to camera level
|
||||
global_config = config.dict(
|
||||
include={
|
||||
"birdseye": ...,
|
||||
"record": ...,
|
||||
"snapshots": ...,
|
||||
"live": ...,
|
||||
|
||||
Reference in New Issue
Block a user