Skip to content

Commit

Permalink
rpi: add rpiCameraFlickerPeriod (#3463)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Aug 18, 2024
1 parent 6256d0b commit 71a9f60
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apidocs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ components:
type: number
rpiCameraExposure:
type: string
rpiCameraFlickerPeriod:
type: integer
rpiCameraAWB:
type: string
rpiCameraAWBGains:
Expand Down
1 change: 1 addition & 0 deletions internal/conf/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
1 change: 1 addition & 0 deletions internal/core/path_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0.0
v2.1.0
1 change: 1 addition & 0 deletions internal/staticsources/rpicamera/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type params struct {
Saturation float64
Sharpness float64
Exposure string
FlickerPeriod int
AWB string
AWBGainRed float64
AWBGainBlue float64
Expand Down
1 change: 1 addition & 0 deletions internal/staticsources/rpicamera/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
2 changes: 2 additions & 0 deletions mediamtx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 71a9f60

Please sign in to comment.