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 75d317d
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 @@ -420,6 +420,8 @@ components:
type: number
rpiCameraAfWindow:
type: string
rpiCameraFlickerPeriod:
type: integer
rpiCameraTextOverlayEnable:
type: boolean
rpiCameraTextOverlay:
Expand Down
1 change: 1 addition & 0 deletions internal/conf/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ type Path struct {
RPICameraAfSpeed string `json:"rpiCameraAfSpeed"`
RPICameraLensPosition float64 `json:"rpiCameraLensPosition"`
RPICameraAfWindow string `json:"rpiCameraAfWindow"`
RPICameraFlickerPeriod int `json:"rpiCameraFlickerPeriod"`
RPICameraTextOverlayEnable bool `json:"rpiCameraTextOverlayEnable"`
RPICameraTextOverlay string `json:"rpiCameraTextOverlay"`

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 @@ -34,6 +34,7 @@ type params struct {
AfSpeed string
LensPosition float64
AfWindow string
FlickerPeriod int
TextOverlayEnable bool
TextOverlay string
}
1 change: 1 addition & 0 deletions internal/staticsources/rpicamera/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func paramsFromConf(logLevel conf.LogLevel, cnf *conf.Path) params {
AfSpeed: cnf.RPICameraAfSpeed,
LensPosition: cnf.RPICameraLensPosition,
AfWindow: cnf.RPICameraAfWindow,
FlickerPeriod: cnf.RPICameraFlickerPeriod,
TextOverlayEnable: cnf.RPICameraTextOverlayEnable,
TextOverlay: cnf.RPICameraTextOverlay,
}
Expand Down
2 changes: 2 additions & 0 deletions mediamtx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,8 @@ pathDefaults:
# Specifies the autofocus window, in the form x,y,width,height where the coordinates
# are given as a proportion of the entire image.
rpiCameraAfWindow:
# Manual flicker correction period, in microseconds.
rpiCameraFlickerPeriod: 0
# enables printing text on each frame.
rpiCameraTextOverlayEnable: false
# text that is printed on each frame.
Expand Down

0 comments on commit 75d317d

Please sign in to comment.