[vlc-commits] demux: dash: handle MPEG2TS profiles

Francois Cartegnie git at videolan.org
Thu Dec 18 22:39:58 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 17 16:50:49 2014 +0100| [1ad96d63ff9ca3e9ab6d41df58837c66e65444a8] | committer: Francois Cartegnie

demux: dash: handle MPEG2TS profiles

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

 modules/stream_filter/dash/Streams.cpp        |   13 +++++++++++++
 modules/stream_filter/dash/Streams.hpp        |    7 +++++++
 modules/stream_filter/dash/mpd/MPDFactory.cpp |    1 +
 3 files changed, 21 insertions(+)

diff --git a/modules/stream_filter/dash/Streams.cpp b/modules/stream_filter/dash/Streams.cpp
index b2340d8..766f759 100644
--- a/modules/stream_filter/dash/Streams.cpp
+++ b/modules/stream_filter/dash/Streams.cpp
@@ -77,6 +77,8 @@ Format Stream::mimeToFormat(const std::string &mime)
         std::string tail = mime.substr(pos + 1);
         if(tail == "mp4")
             format = Streams::MP4;
+        else if (tail == "mp2t")
+            format = Streams::MPEG2TS;
     }
     return format;
 }
@@ -89,6 +91,9 @@ void Stream::create(demux_t *demux, IAdaptationLogic *logic)
         case Streams::MP4:
             output = new MP4StreamOutput(demux);
             break;
+        case Streams::MPEG2TS:
+            output = new MPEG2TSStreamOutput(demux);
+            break;
         default:
             throw VLC_EBADVAR;
             break;
@@ -300,3 +305,11 @@ MP4StreamOutput::MP4StreamOutput(demux_t *demux) :
     if(!demuxstream)
         throw VLC_EGENERIC;
 }
+
+MPEG2TSStreamOutput::MPEG2TSStreamOutput(demux_t *demux) :
+    AbstractStreamOutput(demux)
+{
+    demuxstream = stream_DemuxNew(demux, "ts", fakeesout);
+    if(!demuxstream)
+        throw VLC_EGENERIC;
+}
diff --git a/modules/stream_filter/dash/Streams.hpp b/modules/stream_filter/dash/Streams.hpp
index 8d125f0..387ad97 100644
--- a/modules/stream_filter/dash/Streams.hpp
+++ b/modules/stream_filter/dash/Streams.hpp
@@ -97,6 +97,13 @@ namespace dash
                 MP4StreamOutput(demux_t *);
                 virtual ~MP4StreamOutput(){}
         };
+
+        class MPEG2TSStreamOutput : public AbstractStreamOutput
+        {
+            public:
+                MPEG2TSStreamOutput(demux_t *);
+                virtual ~MPEG2TSStreamOutput(){}
+        };
     }
 }
 #endif // STREAMS_HPP
diff --git a/modules/stream_filter/dash/mpd/MPDFactory.cpp b/modules/stream_filter/dash/mpd/MPDFactory.cpp
index ccd6273..ba1e399 100644
--- a/modules/stream_filter/dash/mpd/MPDFactory.cpp
+++ b/modules/stream_filter/dash/mpd/MPDFactory.cpp
@@ -40,6 +40,7 @@ MPD* MPDFactory::create             (dash::xml::Node *root, stream_t *p_stream,
         case Profile::ISOOnDemand:
         case Profile::ISOMain:
         case Profile::ISOLive:
+        case Profile::MPEG2TSSimple:
             parser = new IsoffMainParser(root, p_stream);
         default:
             break;



More information about the vlc-commits mailing list