From 38f2d691cf78b0ce69a2f2b9f152890be6312977 Mon Sep 17 00:00:00 2001 From: Saxon Date: Tue, 24 Sep 2019 17:35:17 +0930 Subject: [PATCH] revid: now using correct consts to indicate codec --- revid/revid.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/revid/revid.go b/revid/revid.go index 60801ef5..085fcdd4 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -177,9 +177,9 @@ func (r *Revid) reset(config Config) error { switch r.config.Input { case Raspivid: switch r.config.InputCodec { - case H264: + case codecutil.H264: st = mts.EncodeH264 - case MJPEG: + case codecutil.MJPEG: st = mts.EncodeMJPEG encOptions = append(encOptions, mts.PacketBasedPSI(int(r.config.MinFrames))) } @@ -302,9 +302,9 @@ func (r *Revid) setupPipeline(mtsEnc func(dst io.WriteCloser, rate float64) (io. case Raspivid: r.setupInput = r.startRaspivid switch r.config.InputCodec { - case H264: + case codecutil.H264: r.lexTo = h264.Lex - case MJPEG: + case codecutil.MJPEG: r.lexTo = mjpeg.Lex } case V4L: @@ -409,9 +409,9 @@ func (r *Revid) Update(vars map[string]string) error { case "InputCodec": switch value { case "H264": - r.config.InputCodec = H264 + r.config.InputCodec = codecutil.H264 case "MJPEG": - r.config.InputCodec = MJPEG + r.config.InputCodec = codecutil.MJPEG default: r.config.Logger.Log(logger.Warning, pkg+"invalid InputCodec variable value", "value", value) }