From c11444f04316ed98bad9576c6ad11a994a69ea1a Mon Sep 17 00:00:00 2001 From: Scott Date: Fri, 6 Dec 2019 16:36:29 +1030 Subject: [PATCH] FlipHorizontal & FlipVertical variables renamed --- cmd/revid-cli/main.go | 4 ++-- device/raspivid/raspivid.go | 6 +++--- revid/config/config.go | 4 ++-- revid/revid.go | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cmd/revid-cli/main.go b/cmd/revid-cli/main.go index 59b31be6..4e340b4c 100644 --- a/cmd/revid-cli/main.go +++ b/cmd/revid-cli/main.go @@ -237,8 +237,8 @@ func handleFlags() config.Config { cfg.CameraIP = *cameraIPPtr cfg.Rotation = *rotationPtr - cfg.FlipHorizontal = *horizontalFlipPtr - cfg.FlipVertical = *verticalFlipPtr + cfg.HorizontalFlip = *horizontalFlipPtr + cfg.VerticalFlip = *verticalFlipPtr cfg.RTMPURL = *rtmpUrlPtr cfg.Bitrate = *bitratePtr cfg.OutputPath = *outputPathPtr diff --git a/device/raspivid/raspivid.go b/device/raspivid/raspivid.go index 2b588aeb..3d68ac17 100644 --- a/device/raspivid/raspivid.go +++ b/device/raspivid/raspivid.go @@ -222,14 +222,14 @@ func (r *Raspivid) Start() error { "--awb", fmt.Sprint(r.cfg.AutoWhiteBalance), } - if r.cfg.FlipHorizontal { + if r.cfg.HorizontalFlip { args = append(args, "--hflip") } - if r.cfg.FlipVertical { + if r.cfg.VerticalFlip { args = append(args, "--vflip") } - if r.cfg.FlipHorizontal { + if r.cfg.HorizontalFlip { args = append(args, "--hflip") } diff --git a/revid/config/config.go b/revid/config/config.go index bfd55fd6..1e21b7c0 100644 --- a/revid/config/config.go +++ b/revid/config/config.go @@ -244,8 +244,8 @@ type Config struct { Height uint // Height defines the input video height Raspivid input. Width uint // Width defines the input video width Raspivid input. Bitrate uint // Bitrate specifies the bitrate for constant bitrate in kbps. - FlipHorizontal bool // FlipHorizontal flips video horizontally for Raspivid input. - FlipVertical bool // FlipVertial flips video vertically for Raspivid input. + HorizontalFlip bool // HorizontalFlip flips video horizontally for Raspivid input. + VerticalFlip bool // VerticalFlip flips video vertically for Raspivid input. // RTMP ring buffer parameters. RTMPRBSize int // The number of elements in the RTMP sender ringbuffer. diff --git a/revid/revid.go b/revid/revid.go index 9839d07d..bd657ef1 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -596,18 +596,18 @@ func (r *Revid) Update(vars map[string]string) error { case "HorizontalFlip": switch strings.ToLower(value) { case "true": - r.cfg.FlipHorizontal = true + r.cfg.HorizontalFlip = true case "false": - r.cfg.FlipHorizontal = false + r.cfg.HorizontalFlip = false default: r.cfg.Logger.Log(logger.Warning, pkg+"invalid HorizontalFlip param", "value", value) } case "VerticalFlip": switch strings.ToLower(value) { case "true": - r.cfg.FlipVertical = true + r.cfg.VerticalFlip = true case "false": - r.cfg.FlipVertical = false + r.cfg.VerticalFlip = false default: r.cfg.Logger.Log(logger.Warning, pkg+"invalid VerticalFlip param", "value", value) }