[vlc-commits] demux: dash: add support for timed text

Francois Cartegnie git at videolan.org
Wed Oct 7 20:44:09 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct  7 20:09:54 2015 +0200| [e4b5cf608f6efbd19686b7d84ed71a1a54608ebf] | committer: Francois Cartegnie

demux: dash: add support for timed text

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e4b5cf608f6efbd19686b7d84ed71a1a54608ebf
---

 modules/demux/dash/DASHStream.cpp       |    4 ++++
 modules/demux/dash/DASHStreamFormat.hpp |    3 +++
 2 files changed, 7 insertions(+)

diff --git a/modules/demux/dash/DASHStream.cpp b/modules/demux/dash/DASHStream.cpp
index 474af05..70781b4 100644
--- a/modules/demux/dash/DASHStream.cpp
+++ b/modules/demux/dash/DASHStream.cpp
@@ -49,6 +49,10 @@ AbstractDemuxer * DASHStream::createDemux(const StreamFormat &format)
             ret = new SlaveDemuxer(p_realdemux, "subtitle", fakeesout->getEsOut(), demuxersource);
             break;
 
+        case DASHStreamFormat::TTML:
+            ret = new SlaveDemuxer(p_realdemux, "ttml", fakeesout->getEsOut(), demuxersource);
+            break;
+
         default:
         case StreamFormat::UNSUPPORTED:
             break;
diff --git a/modules/demux/dash/DASHStreamFormat.hpp b/modules/demux/dash/DASHStreamFormat.hpp
index 8fafa79..37ce943 100644
--- a/modules/demux/dash/DASHStreamFormat.hpp
+++ b/modules/demux/dash/DASHStreamFormat.hpp
@@ -33,6 +33,7 @@ namespace dash
             static const unsigned MPEG2TS = StreamFormat::UNSUPPORTED + 1;
             static const unsigned MP4    = StreamFormat::UNSUPPORTED + 2;
             static const unsigned WEBVTT = StreamFormat::UNSUPPORTED + 3;
+            static const unsigned TTML   = StreamFormat::UNSUPPORTED + 4;
 
             static StreamFormat mimeToFormat(const std::string &mime)
             {
@@ -46,6 +47,8 @@ namespace dash
                         return StreamFormat(DASHStreamFormat::MPEG2TS);
                     else if (tail == "vtt")
                         return StreamFormat(DASHStreamFormat::WEBVTT);
+                    else if (tail == "ttml+xml")
+                        return StreamFormat(DASHStreamFormat::TTML);
                 }
                 return StreamFormat();
             }



More information about the vlc-commits mailing list