revid: now using correct consts to indicate codec

This commit is contained in:
Saxon 2019-09-24 17:35:17 +09:30
parent d554173d7c
commit 38f2d691cf
1 changed files with 6 additions and 6 deletions

View File

@ -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)
}