add streaming protocols for correct uri handling
authorFraxinas <andreas.frisch@multimedia-labs.de>
Fri, 29 May 2009 11:48:31 +0000 (13:48 +0200)
committerFraxinas <andreas.frisch@multimedia-labs.de>
Fri, 29 May 2009 11:48:31 +0000 (13:48 +0200)
lib/python/Components/Playlist.py
lib/service/servicemp3.cpp

index c9ebe47..bcb4e3d 100644 (file)
@@ -73,12 +73,14 @@ class PlaylistIOM3U(PlaylistIO):
                                        self.displayname = extinf[1]
                                # TODO: use e2 facilities to create a service ref from file
                        elif entry[0] != "#":
+                               remote_protos = ["http", "https", "udp", "rtsp", "rtp", "mmp"]
                                if entry[0] == "/":
                                        sref = ServiceReference("4097:0:0:0:0:0:0:0:0:0:" + entry)
-                               elif entry.startswith("http"):
-                                       sref = ServiceReference("4097:0:0:0:0:0:0:0:0:0:" + entry.replace(':',"%3a"))
                                else:
                                        sref = ServiceReference("4097:0:0:0:0:0:0:0:0:0:" + os.path.dirname(filename) + "/" + entry)
+                                       for proto in remote_protos:
+                                               if entry.startswith(proto):
+                                                       sref = ServiceReference("4097:0:0:0:0:0:0:0:0:0:" + entry.replace(':',"%3a"))
                                if self.displayname:
                                        sref.ref.setName(self.displayname)
                                        self.displayname = None
index 1f3e2d0..b3f9974 100644 (file)
@@ -250,7 +250,7 @@ eServiceMP3::eServiceMP3(const char *filename, const char *title): m_filename(fi
                sourceinfo.containertype = ctVCD;
                sourceinfo.is_video = TRUE;
        }
-       if ( (strncmp(filename, "http://", 7)) == 0 || (strncmp(filename, "udp://", 6)) == 0 || (strncmp(filename, "rtsp://", 7)) == 0 )
+       if ( (strncmp(filename, "http://", 7)) == 0 || (strncmp(filename, "udp://", 6)) == 0 || (strncmp(filename, "rtp://", 6)) == 0  || (strncmp(filename, "https://", 8)) == 0 || (strncmp(filename, "mms://", 6)) == 0 || (strncmp(filename, "rtsp://", 7)) == 0 )
                sourceinfo.is_streaming = TRUE;
 
        gchar *uri;