summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-04-27 10:28:18 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-27 10:28:18 +0000
commit6b2f1524f88466f9f20e8226abf25274d94947d4 (patch)
treee336b122f7ee64937b94ed7edf8a9f9da71f27b9
parent93b170e6292d58d251299b5d3d7c51c5c0afd65b (diff)
downloaduxp-6b2f1524f88466f9f20e8226abf25274d94947d4.tar.gz
Issue #1820 - Part 3: Use Codec detail extractor helper to tell if it's a new
style VP8/VP9 codec string.
-rw-r--r--dom/media/VideoUtils.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/dom/media/VideoUtils.cpp b/dom/media/VideoUtils.cpp
index 66a6d6f9b7..cc8d561460 100644
--- a/dom/media/VideoUtils.cpp
+++ b/dom/media/VideoUtils.cpp
@@ -641,15 +641,25 @@ IsAACCodecString(const nsAString& aCodec)
bool
IsVP8CodecString(const nsAString& aCodec)
{
+ uint8_t profile = 0;
+ uint8_t level = 0;
+ uint8_t bitDepth = 0;
return aCodec.EqualsLiteral("vp8") ||
- aCodec.EqualsLiteral("vp8.0");
+ aCodec.EqualsLiteral("vp8.0") ||
+ (StartsWith(NS_ConvertUTF16toUTF8(aCodec), "vp08") &&
+ ExtractVPXCodecDetails(aCodec, profile, level, bitDepth));
}
bool
IsVP9CodecString(const nsAString& aCodec)
{
+ uint8_t profile = 0;
+ uint8_t level = 0;
+ uint8_t bitDepth = 0;
return aCodec.EqualsLiteral("vp9") ||
- aCodec.EqualsLiteral("vp9.0");
+ aCodec.EqualsLiteral("vp9.0") ||
+ (StartsWith(NS_ConvertUTF16toUTF8(aCodec), "vp09") &&
+ ExtractVPXCodecDetails(aCodec, profile, level, bitDepth));
}
#ifdef MOZ_AV1