From ee613dd296b76b00577510e60db0cb880e87d469 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 5 Sep 2008 19:25:10 +0000 Subject: * luci/applications/uvc_streamer: - display streaming address in map description - sync translation - add credits --- .../luasrc/controller/uvc_streamer.lua | 15 ++++++++++++ .../luasrc/i18n/uvc_streamer.de.lua | 2 +- .../luasrc/i18n/uvc_streamer.de.xml | 2 +- .../luasrc/i18n/uvc_streamer.en.lua | 2 +- .../luasrc/i18n/uvc_streamer.en.xml | 2 +- .../luasrc/model/cbi/uvc_streamer.lua | 28 ++++++++++++++++++++-- 6 files changed, 45 insertions(+), 6 deletions(-) (limited to 'applications/luci-uvc_streamer') diff --git a/applications/luci-uvc_streamer/luasrc/controller/uvc_streamer.lua b/applications/luci-uvc_streamer/luasrc/controller/uvc_streamer.lua index a1f229671..1766c2b11 100644 --- a/applications/luci-uvc_streamer/luasrc/controller/uvc_streamer.lua +++ b/applications/luci-uvc_streamer/luasrc/controller/uvc_streamer.lua @@ -1,3 +1,18 @@ +--[[ + +LuCI UVC Streamer +(c) 2008 Yanira + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +]]-- + module("luci.controller.uvc_streamer", package.seeall) function index() diff --git a/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.de.lua b/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.de.lua index 21cbfa504..b340fd4cb 100644 --- a/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.de.lua +++ b/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.de.lua @@ -2,4 +2,4 @@ framespersecond = 'Bilder pro Sekunde' resolution = 'Auflösung' settings = 'Konfiguration' uvc_streamer = 'Webcam Stream' -uvc_streamer_desc = 'Linux-UVC Webcam Konfiguration. Im Browser z.B. http://192.168.1.1:8080/ laden.' +uvc_streamer_desc = 'Linux-UVC Webcam Konfiguration. Im Browser z.B. http://%s:%i/ laden.' diff --git a/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.de.xml b/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.de.xml index 3151781de..1d7b94647 100644 --- a/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.de.xml +++ b/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.de.xml @@ -6,6 +6,6 @@ Auflösung Konfiguration Webcam Stream -Linux-UVC Webcam Konfiguration. Im Browser z.B. http://192.168.1.1:8080/ laden. +Linux-UVC Webcam Konfiguration. Im Browser z.B. http://%s:%i/ laden. diff --git a/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.en.lua b/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.en.lua index b791bd914..e56eacc2a 100644 --- a/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.en.lua +++ b/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.en.lua @@ -2,4 +2,4 @@ framespersecond = 'Frames per second' resolution = 'Resolution' settings = 'Settings' uvc_streamer = 'Webcam streaming' -uvc_streamer_desc = 'Configure your Linux-UVC compatible webcam. Point your browser to e.g. http://192.168.1.1:8080/' +uvc_streamer_desc = 'Configure your Linux-UVC compatible webcam. Point your browser to e.g. http://%s:%i/' diff --git a/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.en.xml b/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.en.xml index b60780942..5d20d21d5 100644 --- a/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.en.xml +++ b/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.en.xml @@ -6,6 +6,6 @@ Resolution Settings Webcam streaming -Configure your Linux-UVC compatible webcam. Point your browser to e.g. http://192.168.1.1:8080/ +Configure your Linux-UVC compatible webcam. Point your browser to e.g. http://%s:%i/ diff --git a/applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua b/applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua index 7c8e4bd49..2054185d4 100644 --- a/applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua +++ b/applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua @@ -1,6 +1,30 @@ -m = Map("uvc-streamer", translate("uvc_streamer"), translate("uvc_streamer_desc")) +--[[ -s = m:section(TypedSection, "uvc-streamer", translate("settings")) +LuCI UVC Streamer +(c) 2008 Yanira + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +]]-- + +-- find current lan address and port of first uvc_streamer config section +local uci = luci.model.uci.cursor_state() +local addr = uci:get("network", "lan", "ipaddr") +local port + +uci:foreach( "uvc_streamer", "uvc_streamer", + function(section) port = port or tonumber(section.port) end ) + +m = Map("uvc_streamer", translate("uvc_streamer"), + translatef("uvc_streamer_desc", nil, addr, port, addr, port)) + +s = m:section(TypedSection, "uvc_streamer", translate("settings")) s.addremove = false s.anonymous = true -- cgit v1.2.3