From: Roman Bazalevsky Date: Fri, 23 Oct 2015 18:07:28 +0000 (+0300) Subject: Добавлен поток ogg без ограничения скорости (префикс /ogv и /m3uo для списка). X-Git-Url: https://git.rvb.name/vpproxy.git/commitdiff_plain/0290989946a23f98c84016c05727f72d3a2c2073?hp=8960711387d2b34c7f8b8d8a0cc036e52c6c6f06 Добавлен поток ogg без ограничения скорости (префикс /ogv и /m3uo для списка). --- diff --git a/plugins/m3u_plugin.py b/plugins/m3u_plugin.py index 2ea921a..636ad4e 100644 --- a/plugins/m3u_plugin.py +++ b/plugins/m3u_plugin.py @@ -38,7 +38,7 @@ import os class M3u(VPProxyPlugin): - handlers = ('m3u', 'm3ut', 'm3uw', 'list', 'play', 'index') + handlers = ('m3u', 'm3ut', 'm3uw', 'm3uo', 'list', 'play', 'index') logger = logging.getLogger('plugin_m3u') playlist = None @@ -55,6 +55,8 @@ class M3u(VPProxyPlugin): prefix='ogg' elif self.splitted_path[1]=='m3ut': prefix='mp4' + elif self.splitted_path[1]=='m3uo': + prefix='ogv' elif self.splitted_path[1] in ("list","play","index"): None else: diff --git a/vlcclient/vlcmessages.py b/vlcclient/vlcmessages.py index 1d03938..48e9321 100644 --- a/vlcclient/vlcmessages.py +++ b/vlcclient/vlcmessages.py @@ -16,6 +16,9 @@ class VlcMessage(object): elif qtype=='ogg': command = command + 'transcode{vcodec=theora,acodec=vorbis,vb=800,ab=128}:' muxer='ogg' + elif qtype=='ogv': + command = command + 'transcode{vcodec=theora,acodec=vorbis}:' + muxer='ogg' # elif qtype=='webm': # command = command + 'transcode{vcodec=VP80,acodec=vorbis,vb=512,ab=64}:' # muxer='ffmpeg{mux=ogg}' diff --git a/vphttp.py b/vphttp.py index 0a6ae43..155db57 100644 --- a/vphttp.py +++ b/vphttp.py @@ -165,7 +165,7 @@ class HTTPHandler(BaseHTTPServer.BaseHTTPRequestHandler): self.reqtype = self.splittedpath[1].lower() # If first parameter is 'pid' or 'torrent' or it should be handled # by plugin - if not (self.reqtype in ('get','mp4','ogg') or self.reqtype in VPStuff.pluginshandlers): + if not (self.reqtype in ('get','mp4','ogg','ogv') or self.reqtype in VPStuff.pluginshandlers): self.dieWithError(400) # 400 Bad Request return except IndexError: @@ -237,7 +237,7 @@ class HTTPHandler(BaseHTTPServer.BaseHTTPRequestHandler): "Sending fake headers for " + useragent) self.send_response(200) self.send_header('Cache-Control','no-cache'); - if self.reqtype=="ogg": + if self.reqtype in ("ogg","ogv"): self.send_header("Content-Type", "video/ogg") else: self.send_header("Content-Type", "video/mpeg")