Allow playback of VCD (Video CD) and SVCD
authorAndreas Frisch <andreas.frisch@multimedia-labs.de>
Fri, 3 Oct 2008 20:52:50 +0000 (20:52 +0000)
committerAndreas Frisch <andreas.frisch@multimedia-labs.de>
Fri, 3 Oct 2008 20:52:50 +0000 (20:52 +0000)
lib/python/Components/Scanner.py
lib/python/Plugins/Extensions/MediaPlayer/plugin.py
lib/service/servicemp3.cpp

index f7e307b..c217aa5 100644 (file)
@@ -32,6 +32,8 @@ def getType(file):
                        return "video/x-dvd-iso"
                elif file[-12:].lower() == "video_ts.ifo":
                        return "video/x-dvd"
                        return "video/x-dvd-iso"
                elif file[-12:].lower() == "video_ts.ifo":
                        return "video/x-dvd"
+               elif ext == "dat" and file[-11:-6].lower() == "avseq":
+                       return "video/x-vcd"
        return type
 
 class Scanner:
        return type
 
 class Scanner:
index c4282a0..25491b6 100644 (file)
@@ -843,6 +843,15 @@ def filescan(**kwargs):
                        description = "View Movies...",
                        openfnc = filescan_open,
                ),
                        description = "View Movies...",
                        openfnc = filescan_open,
                ),
+               Scanner(mimetypes = ["video/x-vcd"],
+                       paths_to_scan =
+                               [
+                                       ScanPath(path = "mpegav", with_subdirs = False),
+                               ],
+                       name = "Video CD",
+                       description = "View Video CD...",
+                       openfnc = filescan_open,
+               ),
                Scanner(mimetypes = ["audio/mpeg", "audio/x-wav", "application/ogg"],
                        paths_to_scan =
                                [
                Scanner(mimetypes = ["audio/mpeg", "audio/x-wav", "application/ogg"],
                        paths_to_scan =
                                [
index 25c5293..0197d26 100644 (file)
@@ -195,7 +195,7 @@ eServiceMP3::eServiceMP3(const char *filename): m_filename(filename), m_pump(eAp
        if (!ext)
                ext = filename;
 
        if (!ext)
                ext = filename;
 
-       int is_mpeg_ps = !(strcasecmp(ext, ".mpeg") && strcasecmp(ext, ".mpg") && strcasecmp(ext, ".vob") && strcasecmp(ext, ".bin"));
+       int is_mpeg_ps = !(strcasecmp(ext, ".mpeg") && strcasecmp(ext, ".mpg") && strcasecmp(ext, ".vob") && strcasecmp(ext, ".bin") && strcasecmp(ext, ".dat"));
        int is_mpeg_ts = !strcasecmp(ext, ".ts");
        int is_matroska = !strcasecmp(ext, ".mkv");
        int is_avi = !strcasecmp(ext, ".avi");
        int is_mpeg_ts = !strcasecmp(ext, ".ts");
        int is_matroska = !strcasecmp(ext, ".mkv");
        int is_avi = !strcasecmp(ext, ".avi");
@@ -1092,7 +1092,6 @@ void eServiceMP3::gstCBsubtitleAvail(GstElement *element, GstBuffer *buffer, Gst
        }
        else
                eDebug("on inactive element: %s (%p) saw subtitle: %s",sourceName, element, text);
        }
        else
                eDebug("on inactive element: %s (%p) saw subtitle: %s",sourceName, element, text);
-       return TRUE;
 }
 
 RESULT eServiceMP3::enableSubtitles(eWidget *parent, ePyObject tuple)
 }
 
 RESULT eServiceMP3::enableSubtitles(eWidget *parent, ePyObject tuple)