Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: media/base/mime_util_unittest.cc

Issue 2803823003: Query LibVPX for VP9 profile support.
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/mime_util_internal.cc ('k') | media/filters/vpx_video_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/mime_util_unittest.cc
diff --git a/media/base/mime_util_unittest.cc b/media/base/mime_util_unittest.cc
index 5e0f598e48374e10471056d9ecb82b2e5077e7dd..c36765585e6bd03affee15beb8fc0291f0db5df0 100644
--- a/media/base/mime_util_unittest.cc
+++ b/media/base/mime_util_unittest.cc
@@ -234,6 +234,49 @@ TEST(MimeUtilTest, ExperimentalMultiPartVp9) {
EXPECT_TRUE(IsSupportedMediaFormat("video/webm", {"vp09.00.10.08"}));
}
+TEST(MimeUtilTest, Vp9ProfileSupport) {
+ // TODO(chcunningham): remove when enabled by default.
+ EnableNewVp9CodecStringSupport();
+
+#if !defined(OS_ANDROID)
+ // For all non-android platforms, support for any VP9 profile should be
+ // unambiguous.
+
+ // All platforms support profiles 0 and 1
+ EXPECT_EQ(IsSupported,
+ IsSupportedMediaFormat("video/webm", {"vp09.00.10.08"}));
+ EXPECT_EQ(IsSupported,
+ IsSupportedMediaFormat("video/webm", {"vp09.01.10.08"}));
+
+ // Support for 2 and 3 is platform dependent, but should never be ambiguous.
+ EXPECT_NE(MayBeSupported,
+ IsSupportedMediaFormat("video/webm", {"vp09.02.10.08"}));
+ EXPECT_NE(MayBeSupported,
+ IsSupportedMediaFormat("video/webm", {"vp09.03.10.08"}));
+#else
+ // Android should always support profile 0. Support for higher profiles is
+ // ambiguous.
+ EXPECT_EQ(IsSupported,
+ IsSupportedMediaFormat("video/webm", {"vp09.00.10.08"}));
+ EXPECT_EQ(MayBeSupported,
+ IsSupportedMediaFormat("video/webm", {"vp09.01.10.08"}));
+ EXPECT_EQ(MayBeSupported,
+ IsSupportedMediaFormat("video/webm", {"vp09.02.10.08"}));
+ EXPECT_EQ(MayBeSupported,
+ IsSupportedMediaFormat("video/webm", {"vp09.03.10.08"}));
+#endif
+
+ // When using CDM decoders, support is currently only known for profile 0.
+ EXPECT_EQ(IsSupported,
+ IsSupportedEncryptedMediaFormat("video/webm", {"vp09.00.10.08"}));
+ EXPECT_EQ(MayBeSupported,
+ IsSupportedEncryptedMediaFormat("video/webm", {"vp09.01.10.08"}));
+ EXPECT_EQ(MayBeSupported,
+ IsSupportedEncryptedMediaFormat("video/webm", {"vp09.02.10.08"}));
+ EXPECT_EQ(MayBeSupported,
+ IsSupportedEncryptedMediaFormat("video/webm", {"vp09.03.10.08"}));
+}
+
TEST(IsCodecSupportedOnAndroidTest, EncryptedCodecsFailWithoutPlatformSupport) {
// Vary all parameters except |has_platform_decoders|.
MimeUtil::PlatformInfo states_to_vary = VaryAllFields();
« no previous file with comments | « media/base/mime_util_internal.cc ('k') | media/filters/vpx_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698