[vlc-commits] demux: dash: add WebM support
Francois Cartegnie
git at videolan.org
Mon Apr 30 19:48:42 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 26 10:27:09 2018 +0200| [e32b023f50edeb0da89b2a6f686e6f3f218ab92d] | committer: Francois Cartegnie
demux: dash: add WebM support
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e32b023f50edeb0da89b2a6f686e6f3f218ab92d
---
NEWS | 1 +
modules/demux/adaptive/StreamFormat.cpp | 4 ++++
modules/demux/adaptive/StreamFormat.hpp | 1 +
modules/demux/dash/DASHStream.cpp | 4 ++++
4 files changed, 10 insertions(+)
diff --git a/NEWS b/NEWS
index 087f434eb5..342282581c 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ Audio output:
Demuxer:
* Support for HEIF format
+ * Support for DASH WebM
Codecs:
* Support for experimental AV1 video encoding
diff --git a/modules/demux/adaptive/StreamFormat.cpp b/modules/demux/adaptive/StreamFormat.cpp
index 11cee69dac..c5f027df59 100644
--- a/modules/demux/adaptive/StreamFormat.cpp
+++ b/modules/demux/adaptive/StreamFormat.cpp
@@ -46,6 +46,8 @@ std::string StreamFormat::str() const
return "Timed Text";
case PACKEDAAC:
return "Packed AAC";
+ case WEBM:
+ return "WebM";
case UNSUPPORTED:
return "Unsupported";
default:
@@ -76,6 +78,8 @@ StreamFormat::StreamFormat( const std::string &mimetype )
formatid = StreamFormat::WEBVTT;
else if (tail == "ttml+xml")
formatid = StreamFormat::TTML;
+ else if (tail == "webm")
+ formatid = StreamFormat::WEBM;
}
}
diff --git a/modules/demux/adaptive/StreamFormat.hpp b/modules/demux/adaptive/StreamFormat.hpp
index 7b3d49e1b4..62b4865a38 100644
--- a/modules/demux/adaptive/StreamFormat.hpp
+++ b/modules/demux/adaptive/StreamFormat.hpp
@@ -34,6 +34,7 @@ namespace adaptive
static const unsigned WEBVTT = 3;
static const unsigned TTML = 4;
static const unsigned PACKEDAAC = 5;
+ static const unsigned WEBM = 6;
static const unsigned UNKNOWN = 0xFF; /* will probe */
StreamFormat( unsigned = UNSUPPORTED );
diff --git a/modules/demux/dash/DASHStream.cpp b/modules/demux/dash/DASHStream.cpp
index 307178de4d..f472ecc761 100644
--- a/modules/demux/dash/DASHStream.cpp
+++ b/modules/demux/dash/DASHStream.cpp
@@ -46,6 +46,10 @@ AbstractDemuxer *DASHStream::newDemux(demux_t *p_realdemux, const StreamFormat &
ret = AbstractStream::newDemux(p_realdemux, format, out, source);
break;
+ case StreamFormat::WEBM:
+ ret = new Demuxer(p_realdemux, "mkv", out, source);
+ break;
+
case StreamFormat::WEBVTT:
ret = new SlaveDemuxer(p_realdemux, "webvtt", out, source);
break;
More information about the vlc-commits
mailing list