mirror of
https://github.com/kerberos-io/agent.git
synced 2026-08-23 15:08:32 +00:00
feat(machinery/config): add ONVIFMotion capture flag
Adds Capture.ONVIFMotion and the matching AGENT_CAPTURE_ONVIF_MOTION environment override. When set to 'true', the agent will open an ONVIF event stream against the configured camera and route Motion events into the existing HandleMotion channel (wired up in the next commit). Defaults to empty (disabled), so existing deployments using the pixel-diff motion detector see no behaviour change.
This commit is contained in:
committed by
ttradesman
parent
94b26cf096
commit
5a58808f20
@@ -377,6 +377,9 @@ func applyAgentEnvVars(configuration *models.Configuration, prefix string, apply
|
||||
case "AGENT_CAPTURE_MOTION":
|
||||
configuration.Config.Capture.Motion = value
|
||||
break
|
||||
case "AGENT_CAPTURE_ONVIF_MOTION":
|
||||
configuration.Config.Capture.ONVIFMotion = value
|
||||
break
|
||||
case "AGENT_CAPTURE_SNAPSHOTS":
|
||||
configuration.Config.Capture.Snapshots = value
|
||||
break
|
||||
|
||||
@@ -75,6 +75,14 @@ type Capture struct {
|
||||
Fragmented string `json:"fragmented,omitempty" bson:"fragmented,omitempty"`
|
||||
FragmentedDuration int64 `json:"fragmentedduration,omitempty" bson:"fragmentedduration,omitempty"`
|
||||
PixelChangeThreshold *int `json:"pixelChangeThreshold,omitempty"`
|
||||
// ONVIFMotion routes the camera's ONVIF motion events into the
|
||||
// agent's motion-triggered recording pipeline. When "true" the
|
||||
// agent opens an event/stream against the configured ONVIF
|
||||
// endpoint and forwards Motion+Active events to HandleMotion.
|
||||
// Requires Capture.IPCamera.ONVIFXAddr / ONVIFUsername /
|
||||
// ONVIFPassword to be set. Default empty (disabled) keeps the
|
||||
// existing pixel-diff motion detection as the only source.
|
||||
ONVIFMotion string `json:"onvif_motion,omitempty" bson:"onvif_motion,omitempty"`
|
||||
}
|
||||
|
||||
// IPCamera configuration, such as the RTSP url of the IPCamera and the FPS.
|
||||
|
||||
Reference in New Issue
Block a user