From 589f65d4bb02ee6d4d39a2b17c3fed774f526158 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Mon, 3 Mar 2014 21:42:52 +0100 Subject: [PATCH] =?UTF-8?q?=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20supe?= =?UTF-8?q?rTornado.py=20=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20v/vide?= =?UTF-8?q?o.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- superTornado.py | 6 ++++-- v/video.html | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/superTornado.py b/superTornado.py index a6d543a..0605d55 100644 --- a/superTornado.py +++ b/superTornado.py @@ -26,6 +26,8 @@ portCamera = "" portServ ="" log = Log() urlCamera="" +urlSocket="" + class BaseHandler(tornado.web.RequestHandler): @@ -35,7 +37,8 @@ class BaseHandler(tornado.web.RequestHandler): class MainHandler(BaseHandler): def get(self): - self.render("v/index.html") + urlSocket = 'ws://'+socket.getaddrinfo(socket.gethostname(), None)':'+portCamera+'/socket' + self.render("v/index.html", url=urlSocket) def post(self): iden = self.get_argument("id","") @@ -177,7 +180,6 @@ if __name__ == "__main__": urlCamera = 'http://test:a@'+ipCamera+':'+portCamera+'/image.jpg?cidx=791836195' log.printL("->Ping camera ...",lvl.INFO) try : - socket.setdefaulttimeout(30) f = urlopen(urlCamera) log.printL( "->Camera OK ", lvl.SUCCESS) except Exception, e : diff --git a/v/video.html b/v/video.html index e78f8dd..3fb9c1a 100644 --- a/v/video.html +++ b/v/video.html @@ -6,7 +6,7 @@ Acces camera