mirror of https://bitbucket.org/ausocean/av.git
revid: added code to deal with Input var
This commit is contained in:
parent
8c1c192218
commit
504179c03b
|
@ -423,6 +423,13 @@ func (r *Revid) Update(vars map[string]string) error {
|
||||||
//look through the vars and update revid where needed
|
//look through the vars and update revid where needed
|
||||||
for key, value := range vars {
|
for key, value := range vars {
|
||||||
switch key {
|
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":
|
case "Saturation":
|
||||||
s, err := strconv.ParseInt(value, 10, 0)
|
s, err := strconv.ParseInt(value, 10, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue