mirror of https://bitbucket.org/ausocean/av.git
revid: general clean
This commit is contained in:
parent
524989d2ed
commit
056f3b75b3
|
@ -129,10 +129,10 @@ func handleFlags() revid.Config {
|
|||
quantizationPtr = flag.Uint("Quantization", 0, "Desired quantization value: 0-40")
|
||||
intraRefreshPeriodPtr = flag.Uint("IntraRefreshPeriod", 0, "The IntraRefreshPeriod i.e. how many keyframes we send")
|
||||
rotationPtr = flag.Uint("Rotatation", 0, "Rotate video output. (0-359 degrees)")
|
||||
brightnessPtr = flag.Uint("Brightness", 50, "Set Brightness: 0-100 ")
|
||||
saturationPtr = flag.Int("Saturation", 0, "Set Saturation: -100:100")
|
||||
exposurePtr = flag.String("Exposure", "auto", "Set exposure mode: "+strings.Join(revid.ExposureModes[:], ","))
|
||||
autoWhiteBalancePtr = flag.String("Awb", "auto", "Set automatic white balance mode: "+strings.Join(revid.AwbModes[:], ","))
|
||||
brightnessPtr = flag.Uint("Brightness", 50, "Set brightness. (0-100) ")
|
||||
saturationPtr = flag.Int("Saturation", 0, "Set Saturation. (100-100)")
|
||||
exposurePtr = flag.String("Exposure", "auto", "Set exposure mode. ("+strings.Join(revid.ExposureModes[:], ",")+")")
|
||||
autoWhiteBalancePtr = flag.String("Awb", "auto", "Set automatic white balance mode. ("+strings.Join(revid.AwbModes[:], ",")+")")
|
||||
)
|
||||
|
||||
var outputs flagStrings
|
||||
|
|
|
@ -73,9 +73,10 @@ type Config struct {
|
|||
Brightness uint
|
||||
Saturation int
|
||||
Exposure string
|
||||
Awb string
|
||||
AutoWhiteBalance string
|
||||
}
|
||||
|
||||
// Possible modes for raspivid --exposure parameter.
|
||||
var ExposureModes = [...]string{
|
||||
"auto",
|
||||
"night",
|
||||
|
@ -91,7 +92,8 @@ var ExposureModes = [...]string{
|
|||
"fireworks",
|
||||
}
|
||||
|
||||
var AwbModes = [...]string{
|
||||
// Possible modes for raspivid --awb parameter.
|
||||
var AutoWhiteBalanceModes = [...]string{
|
||||
"off",
|
||||
"auto",
|
||||
"sun",
|
||||
|
@ -309,6 +311,7 @@ func (c *Config) Validate(r *Revid) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// stringInSlice returns true if want is in slice.
|
||||
func stringInSlice(want string, slice []string) bool {
|
||||
for _, s := range slice {
|
||||
if s == want {
|
||||
|
|
Loading…
Reference in New Issue