diff --git a/apidocs/openapi.yaml b/apidocs/openapi.yaml index a13c5795b06..812ae90d121 100644 --- a/apidocs/openapi.yaml +++ b/apidocs/openapi.yaml @@ -374,6 +374,8 @@ components: type: number rpiCameraExposure: type: string + rpiCameraFlickerPeriod: + type: integer rpiCameraAWB: type: string rpiCameraAWBGains: diff --git a/internal/conf/path.go b/internal/conf/path.go index 925f050f439..1a0b7397729 100644 --- a/internal/conf/path.go +++ b/internal/conf/path.go @@ -140,6 +140,7 @@ type Path struct { RPICameraSaturation float64 `json:"rpiCameraSaturation"` RPICameraSharpness float64 `json:"rpiCameraSharpness"` RPICameraExposure string `json:"rpiCameraExposure"` + RPICameraFlickerPeriod int `json:"rpiCameraFlickerPeriod"` RPICameraAWB string `json:"rpiCameraAWB"` RPICameraAWBGains []float64 `json:"rpiCameraAWBGains"` RPICameraDenoise string `json:"rpiCameraDenoise"` diff --git a/internal/core/path_manager.go b/internal/core/path_manager.go index ae78ba1b1e2..623ac6a7c65 100644 --- a/internal/core/path_manager.go +++ b/internal/core/path_manager.go @@ -24,6 +24,7 @@ func pathConfCanBeUpdated(oldPathConf *conf.Path, newPathConf *conf.Path) bool { clone.RPICameraSaturation = newPathConf.RPICameraSaturation clone.RPICameraSharpness = newPathConf.RPICameraSharpness clone.RPICameraExposure = newPathConf.RPICameraExposure + clone.RPICameraFlickerPeriod = newPathConf.RPICameraFlickerPeriod clone.RPICameraAWB = newPathConf.RPICameraAWB clone.RPICameraAWBGains = newPathConf.RPICameraAWBGains clone.RPICameraDenoise = newPathConf.RPICameraDenoise diff --git a/internal/staticsources/rpicamera/mtxrpicamdownloader/VERSION b/internal/staticsources/rpicamera/mtxrpicamdownloader/VERSION index 46b105a30dc..1defe531bfa 100644 --- a/internal/staticsources/rpicamera/mtxrpicamdownloader/VERSION +++ b/internal/staticsources/rpicamera/mtxrpicamdownloader/VERSION @@ -1 +1 @@ -v2.0.0 +v2.1.0 diff --git a/internal/staticsources/rpicamera/params.go b/internal/staticsources/rpicamera/params.go index c847a388545..4ac737037a7 100644 --- a/internal/staticsources/rpicamera/params.go +++ b/internal/staticsources/rpicamera/params.go @@ -12,6 +12,7 @@ type params struct { Saturation float64 Sharpness float64 Exposure string + FlickerPeriod int AWB string AWBGainRed float64 AWBGainBlue float64 diff --git a/internal/staticsources/rpicamera/source.go b/internal/staticsources/rpicamera/source.go index 1a4d49c6b2f..e198656a6f5 100644 --- a/internal/staticsources/rpicamera/source.go +++ b/internal/staticsources/rpicamera/source.go @@ -37,6 +37,7 @@ func paramsFromConf(logLevel conf.LogLevel, cnf *conf.Path) params { Saturation: cnf.RPICameraSaturation, Sharpness: cnf.RPICameraSharpness, Exposure: cnf.RPICameraExposure, + FlickerPeriod: cnf.RPICameraFlickerPeriod, AWB: cnf.RPICameraAWB, AWBGainRed: cnf.RPICameraAWBGains[0], AWBGainBlue: cnf.RPICameraAWBGains[1], diff --git a/mediamtx.yml b/mediamtx.yml index f936a305d3e..7e25329c5df 100644 --- a/mediamtx.yml +++ b/mediamtx.yml @@ -527,6 +527,8 @@ pathDefaults: # exposure mode. # values: normal, short, long, custom rpiCameraExposure: normal + # Manual flicker correction period + rpiCameraFlickerPeriod: 0 # auto-white-balance mode. # values: auto, incandescent, tungsten, fluorescent, indoor, daylight, cloudy, custom rpiCameraAWB: auto