summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-04-27 10:18:49 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-27 10:27:49 +0000
commit93b170e6292d58d251299b5d3d7c51c5c0afd65b (patch)
tree032d7801bb067418ca77249bcdd3b82ff5b0c885 /dom
parentb9b1abc871367f2b3456c4b5d39933015d08a689 (diff)
downloaduxp-93b170e6292d58d251299b5d3d7c51c5c0afd65b.tar.gz
Issue #1820 - Part 2: Add VP9-in-MP4 support to the decoder
This also adds support in StageFright for VP9.0 FourCCs and consolidates individual string checks to helpers for WebM
Diffstat (limited to 'dom')
-rw-r--r--dom/media/fmp4/MP4Decoder.cpp6
-rw-r--r--dom/media/webm/WebMDecoder.cpp3
2 files changed, 7 insertions, 2 deletions
diff --git a/dom/media/fmp4/MP4Decoder.cpp b/dom/media/fmp4/MP4Decoder.cpp
index 7a340d8297..b57cd9b528 100644
--- a/dom/media/fmp4/MP4Decoder.cpp
+++ b/dom/media/fmp4/MP4Decoder.cpp
@@ -134,6 +134,12 @@ MP4Decoder::CanHandleMediaType(const MediaContentType& aType,
NS_LITERAL_CSTRING("audio/flac"), aType));
continue;
}
+ if (IsVP9CodecString(codec)) {
+ trackInfos.AppendElement(
+ CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters(
+ NS_LITERAL_CSTRING("video/vp9"), aType));
+ continue;
+ }
#ifdef MOZ_AV1
if (IsAV1CodecString(codec)) {
trackInfos.AppendElement(
diff --git a/dom/media/webm/WebMDecoder.cpp b/dom/media/webm/WebMDecoder.cpp
index cbe9ffdb78..f0686577d6 100644
--- a/dom/media/webm/WebMDecoder.cpp
+++ b/dom/media/webm/WebMDecoder.cpp
@@ -67,8 +67,7 @@ WebMDecoder::CanHandleMediaType(const nsACString& aMIMETypeExcludingCodecs,
// Note: Only accept VP8/VP9 in a video content type, not in an audio
// content type.
if ((isWebMVideo || isMatroskaVideo) &&
- (codec.EqualsLiteral("vp8") || codec.EqualsLiteral("vp8.0") ||
- codec.EqualsLiteral("vp9") || codec.EqualsLiteral("vp9.0"))) {
+ (IsVP8CodecString(codec) || IsVP9CodecString(codec))) {
continue;
}