Добавлен поток ogg без ограничения скорости (префикс /ogv и /m3uo для списка).
authorRoman Bazalevsky <rvb@rvb.name>
Fri, 23 Oct 2015 18:07:28 +0000 (21:07 +0300)
committerRoman Bazalevsky <rvb@rvb.name>
Fri, 23 Oct 2015 18:07:28 +0000 (21:07 +0300)
plugins/m3u_plugin.py
vlcclient/vlcmessages.py
vphttp.py

index 2ea921adff6cda2da39a63cde251a7fa6df6718e..636ad4e19d6f72e348d4aebf18992496c687f6b5 100644 (file)
@@ -38,7 +38,7 @@ import os
 
 class M3u(VPProxyPlugin):
 
 
 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
 
     logger = logging.getLogger('plugin_m3u')
     playlist = None
@@ -55,6 +55,8 @@ class M3u(VPProxyPlugin):
           prefix='ogg'  
         elif self.splitted_path[1]=='m3ut':
           prefix='mp4'  
           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:
         elif self.splitted_path[1] in ("list","play","index"):
           None  
         else:
index 1d03938a67bbd666c4a45e2de32841d1c33ebf7b..48e9321e0b78ae1f2855fb6be95d4b7e4c130908 100644 (file)
@@ -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=='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}'
 #            elif qtype=='webm':
 #                command = command + 'transcode{vcodec=VP80,acodec=vorbis,vb=512,ab=64}:'
 #                muxer='ffmpeg{mux=ogg}'
index 0a6ae43d3d3379e36cbaa5c4dec5c79a56f66341..155db57e8a739b03e35927112d76df419053c83d 100644 (file)
--- 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
             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:
                 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');
                 "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")
                 self.send_header("Content-Type", "video/ogg")
             else:
                 self.send_header("Content-Type", "video/mpeg")