4 (c) 2008 Yanira <forum-2008@email.de>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
16 -- find current lan address and port of first uvc_streamer config section
17 local uci = luci.model.uci.cursor_state()
18 local addr = uci:get("network", "lan", "ipaddr")
21 uci:foreach( "uvc-streamer", "uvc-streamer",
22 function(section) port = port or tonumber(section.port) end )
24 addr = addr or "192.168.1.1"
27 m = Map("uvc-streamer", translate("uvc_streamer"),
28 translatef("uvc_streamer_desc", nil, addr, port, addr, port))
30 s = m:section(TypedSection, "uvc-streamer", translate("settings"))
34 s:option(Flag, "enabled", translate("enabled", "Enable"))
36 s:option(Value, "device", translate("device")).rmempty = true
38 nm = s:option(Value, "resolution", translate("resolution"))
43 s:option(Value, "framespersecond", translate("framespersecond")).rmempty = true
45 s:option(Value, "port", translate("port", "Port")).rmempty = true