From 504179c03b421930560887db62f2cc6814404425 Mon Sep 17 00:00:00 2001 From: Saxon Date: Tue, 22 Oct 2019 16:17:35 +1030 Subject: [PATCH] revid: added code to deal with Input var --- revid/revid.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/revid/revid.go b/revid/revid.go index b5b23ceb..f8fce8ad 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -423,6 +423,13 @@ func (r *Revid) Update(vars map[string]string) error { //look through the vars and update revid where needed for key, value := range vars { switch key { + case "Input": + v, ok := map[string]uint8{"raspivid": Raspivid, "rtsp": RTSP}[strings.ToLower(value)] + if !ok { + r.config.Logger.Log(logger.Warning, pkg+"invalid input var", "value", value) + break + } + r.config.Input = v case "Saturation": s, err := strconv.ParseInt(value, 10, 0) if err != nil {