diff options
author | Moonchild <moonchild@palemoon.org> | 2019-07-11 14:56:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-11 14:56:41 +0000 |
commit | 04a7c6bb4e4048369e0a635dc02e9d83bbd59f87 (patch) | |
tree | cd580c19b66ce62987ece8df5d2ba7384c329502 /dom/media/mediasource | |
parent | dd924323c3cda022493cd78d42da190577be20cf (diff) | |
parent | 31addeaac8841867008699478ef55e1c1b3d68a7 (diff) | |
download | UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.tar UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.tar.gz UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.tar.lz UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.tar.xz UXP-04a7c6bb4e4048369e0a635dc02e9d83bbd59f87.zip |
Merge pull request #1174 from JeroenVreeken/master
Report matroska containers as supported and also support h.264 content in a matroska container file
Diffstat (limited to 'dom/media/mediasource')
-rw-r--r-- | dom/media/mediasource/ContainerParser.cpp | 3 | ||||
-rw-r--r-- | dom/media/mediasource/MediaSource.cpp | 6 | ||||
-rw-r--r-- | dom/media/mediasource/TrackBuffersManager.cpp | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/dom/media/mediasource/ContainerParser.cpp b/dom/media/mediasource/ContainerParser.cpp index 4ae37d7e9..b4dcfde8a 100644 --- a/dom/media/mediasource/ContainerParser.cpp +++ b/dom/media/mediasource/ContainerParser.cpp @@ -697,6 +697,9 @@ ContainerParser::CreateForMIMEType(const nsACString& aType) if (aType.LowerCaseEqualsLiteral("video/webm") || aType.LowerCaseEqualsLiteral("audio/webm")) { return new WebMContainerParser(aType); } + if (aType.LowerCaseEqualsLiteral("video/x-matroska") || aType.LowerCaseEqualsLiteral("audio/x-matroska")) { + return new WebMContainerParser(aType); + } #ifdef MOZ_FMP4 if (aType.LowerCaseEqualsLiteral("video/mp4") || aType.LowerCaseEqualsLiteral("audio/mp4")) { diff --git a/dom/media/mediasource/MediaSource.cpp b/dom/media/mediasource/MediaSource.cpp index 152c0085a..1c276cdc1 100644 --- a/dom/media/mediasource/MediaSource.cpp +++ b/dom/media/mediasource/MediaSource.cpp @@ -110,14 +110,16 @@ MediaSource::IsTypeSupported(const nsAString& aType, DecoderDoctorDiagnostics* a } return NS_OK; } - if (mimeType.EqualsASCII("video/webm")) { + if (mimeType.EqualsASCII("video/webm") || + mimeType.EqualsASCII("video/x-matroska")) { if (!(Preferences::GetBool("media.mediasource.webm.enabled", false) || IsWebMForced(aDiagnostics))) { return NS_ERROR_DOM_NOT_SUPPORTED_ERR; } return NS_OK; } - if (mimeType.EqualsASCII("audio/webm")) { + if (mimeType.EqualsASCII("audio/webm") || + mimeType.EqualsASCII("audio/x-matroska")) { if (!(Preferences::GetBool("media.mediasource.webm.enabled", false) || Preferences::GetBool("media.mediasource.webm.audio.enabled", true))) { return NS_ERROR_DOM_NOT_SUPPORTED_ERR; diff --git a/dom/media/mediasource/TrackBuffersManager.cpp b/dom/media/mediasource/TrackBuffersManager.cpp index ac6d82411..21fb158b5 100644 --- a/dom/media/mediasource/TrackBuffersManager.cpp +++ b/dom/media/mediasource/TrackBuffersManager.cpp @@ -814,6 +814,8 @@ TrackBuffersManager::CreateDemuxerforMIMEType() ShutdownDemuxers(); if (mType.LowerCaseEqualsLiteral("video/webm") || + mType.LowerCaseEqualsLiteral("video/x-matroska") || + mType.LowerCaseEqualsLiteral("audio/x-matroska") || mType.LowerCaseEqualsLiteral("audio/webm")) { mInputDemuxer = new WebMDemuxer(mCurrentInputBuffer, true /* IsMediaSource*/ ); return; |