mirror of https://bitbucket.org/ausocean/av.git
FlipHorizontal & FlipVertical variables renamed
This commit is contained in:
parent
73398f96a7
commit
c11444f043
|
@ -237,8 +237,8 @@ func handleFlags() config.Config {
|
||||||
|
|
||||||
cfg.CameraIP = *cameraIPPtr
|
cfg.CameraIP = *cameraIPPtr
|
||||||
cfg.Rotation = *rotationPtr
|
cfg.Rotation = *rotationPtr
|
||||||
cfg.FlipHorizontal = *horizontalFlipPtr
|
cfg.HorizontalFlip = *horizontalFlipPtr
|
||||||
cfg.FlipVertical = *verticalFlipPtr
|
cfg.VerticalFlip = *verticalFlipPtr
|
||||||
cfg.RTMPURL = *rtmpUrlPtr
|
cfg.RTMPURL = *rtmpUrlPtr
|
||||||
cfg.Bitrate = *bitratePtr
|
cfg.Bitrate = *bitratePtr
|
||||||
cfg.OutputPath = *outputPathPtr
|
cfg.OutputPath = *outputPathPtr
|
||||||
|
|
|
@ -222,14 +222,14 @@ func (r *Raspivid) Start() error {
|
||||||
"--awb", fmt.Sprint(r.cfg.AutoWhiteBalance),
|
"--awb", fmt.Sprint(r.cfg.AutoWhiteBalance),
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.cfg.FlipHorizontal {
|
if r.cfg.HorizontalFlip {
|
||||||
args = append(args, "--hflip")
|
args = append(args, "--hflip")
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.cfg.FlipVertical {
|
if r.cfg.VerticalFlip {
|
||||||
args = append(args, "--vflip")
|
args = append(args, "--vflip")
|
||||||
}
|
}
|
||||||
if r.cfg.FlipHorizontal {
|
if r.cfg.HorizontalFlip {
|
||||||
args = append(args, "--hflip")
|
args = append(args, "--hflip")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,8 +244,8 @@ type Config struct {
|
||||||
Height uint // Height defines the input video height Raspivid input.
|
Height uint // Height defines the input video height Raspivid input.
|
||||||
Width uint // Width defines the input video width Raspivid input.
|
Width uint // Width defines the input video width Raspivid input.
|
||||||
Bitrate uint // Bitrate specifies the bitrate for constant bitrate in kbps.
|
Bitrate uint // Bitrate specifies the bitrate for constant bitrate in kbps.
|
||||||
FlipHorizontal bool // FlipHorizontal flips video horizontally for Raspivid input.
|
HorizontalFlip bool // HorizontalFlip flips video horizontally for Raspivid input.
|
||||||
FlipVertical bool // FlipVertial flips video vertically for Raspivid input.
|
VerticalFlip bool // VerticalFlip flips video vertically for Raspivid input.
|
||||||
|
|
||||||
// RTMP ring buffer parameters.
|
// RTMP ring buffer parameters.
|
||||||
RTMPRBSize int // The number of elements in the RTMP sender ringbuffer.
|
RTMPRBSize int // The number of elements in the RTMP sender ringbuffer.
|
||||||
|
|
|
@ -596,18 +596,18 @@ func (r *Revid) Update(vars map[string]string) error {
|
||||||
case "HorizontalFlip":
|
case "HorizontalFlip":
|
||||||
switch strings.ToLower(value) {
|
switch strings.ToLower(value) {
|
||||||
case "true":
|
case "true":
|
||||||
r.cfg.FlipHorizontal = true
|
r.cfg.HorizontalFlip = true
|
||||||
case "false":
|
case "false":
|
||||||
r.cfg.FlipHorizontal = false
|
r.cfg.HorizontalFlip = false
|
||||||
default:
|
default:
|
||||||
r.cfg.Logger.Log(logger.Warning, pkg+"invalid HorizontalFlip param", "value", value)
|
r.cfg.Logger.Log(logger.Warning, pkg+"invalid HorizontalFlip param", "value", value)
|
||||||
}
|
}
|
||||||
case "VerticalFlip":
|
case "VerticalFlip":
|
||||||
switch strings.ToLower(value) {
|
switch strings.ToLower(value) {
|
||||||
case "true":
|
case "true":
|
||||||
r.cfg.FlipVertical = true
|
r.cfg.VerticalFlip = true
|
||||||
case "false":
|
case "false":
|
||||||
r.cfg.FlipVertical = false
|
r.cfg.VerticalFlip = false
|
||||||
default:
|
default:
|
||||||
r.cfg.Logger.Log(logger.Warning, pkg+"invalid VerticalFlip param", "value", value)
|
r.cfg.Logger.Log(logger.Warning, pkg+"invalid VerticalFlip param", "value", value)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue