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

Unified Diff: chrome/browser/media/encrypted_media_supported_types_browsertest.cc

Issue 2926393002: Enable vp09 codec string in WebM by default (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | content/browser/media/media_canplaytype_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/encrypted_media_supported_types_browsertest.cc
diff --git a/chrome/browser/media/encrypted_media_supported_types_browsertest.cc b/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
index 05e066d73dad764c002f01295717fcbe6a242cfc..719b7acbe5837b8facf42ac26a9f895d6884088f 100644
--- a/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
+++ b/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
@@ -129,16 +129,10 @@ class EncryptedMediaSupportedTypesTest : public InProcessBrowserTest {
invalid_codecs_.push_back("hev1.1.6.L93.B0");
#endif
- // Codecs allowed by both MP4 and WebM (with given command line flags).
+ // Codecs allowed by both MP4 and WebM.
// For vp9 codec string format, see https://www.webmproject.org/vp9/mp4/
video_common_codecs_.push_back("vp09.00.10.08");
- // Non-zero VP9 profiles are not yet supported, even with the given command
- // line flags. See http://crbug.com/707128
- invalid_codecs_.push_back("vp09.01.10.08");
- invalid_codecs_.push_back("vp09.02.10.10");
- invalid_codecs_.push_back("vp09.03.10.10");
-
// Extended codecs are used, so make sure generic ones fail. These will be
// tested against all initDataTypes as they should always fail to be
// supported.
@@ -157,11 +151,16 @@ class EncryptedMediaSupportedTypesTest : public InProcessBrowserTest {
invalid_codecs_.push_back("hev1.");
invalid_codecs_.push_back("hvc1");
invalid_codecs_.push_back("hvc1.");
+
+ // Non-zero VP9 profiles are supported in WebM and MP4 with ClearKey.
+ // Widevine support will eventually be added. See http://crbug.com/707128
+ clear_key_exclusive_video_common_codecs_.push_back("vp09.01.10.08");
+ clear_key_exclusive_video_common_codecs_.push_back("vp09.02.10.10");
+ clear_key_exclusive_video_common_codecs_.push_back("vp09.03.10.10");
}
void SetUpCommandLine(base::CommandLine* command_line) override {
InProcessBrowserTest::SetUpCommandLine(command_line);
- command_line->AppendSwitch(switches::kEnableNewVp9CodecString);
}
typedef std::vector<std::string> CodecVector;
@@ -178,6 +177,9 @@ class EncryptedMediaSupportedTypesTest : public InProcessBrowserTest {
return video_mp4_hi10p_codecs_;
}
const CodecVector& invalid_codecs() const { return invalid_codecs_; }
+ const CodecVector& clear_key_exclusive_video_common_codecs() const {
+ return clear_key_exclusive_video_common_codecs_;
+ }
#if BUILDFLAG(ENABLE_PEPPER_CDMS)
void SetUpDefaultCommandLine(base::CommandLine* command_line) override {
@@ -282,6 +284,7 @@ class EncryptedMediaSupportedTypesTest : public InProcessBrowserTest {
CodecVector video_mp4_hi10p_codecs_;
CodecVector video_common_codecs_;
CodecVector invalid_codecs_;
+ CodecVector clear_key_exclusive_video_common_codecs_;
};
// For ClearKey, nothing additional is required.
@@ -418,6 +421,9 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesClearKeyTest, Video_WebM) {
kVideoWebMMimeType, video_webm_codecs(), kClearKey));
EXPECT_SUCCESS(AreCodecsSupportedByKeySystem(
kVideoWebMMimeType, video_common_codecs(), kClearKey));
+ EXPECT_SUCCESS(AreCodecsSupportedByKeySystem(
+ kVideoWebMMimeType, clear_key_exclusive_video_common_codecs(),
+ kClearKey));
// Non-video WebM codecs.
EXPECT_NO_MATCH(AreCodecsSupportedByKeySystem(
@@ -456,6 +462,8 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesClearKeyTest, Video_MP4) {
kVideoMP4MimeType, video_mp4_codecs(), kClearKey));
EXPECT_PROPRIETARY(AreCodecsSupportedByKeySystem(
kVideoMP4MimeType, video_common_codecs(), kClearKey));
+ EXPECT_PROPRIETARY(AreCodecsSupportedByKeySystem(
+ kVideoMP4MimeType, clear_key_exclusive_video_common_codecs(), kClearKey));
// High 10-bit Profile is supported when using ClearKey if
// it is supported for clear content on this platform.
@@ -566,6 +574,9 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesExternalClearKeyTest,
kVideoWebMMimeType, video_webm_codecs(), kExternalClearKey));
EXPECT_ECK(AreCodecsSupportedByKeySystem(
kVideoWebMMimeType, video_common_codecs(), kExternalClearKey));
+ EXPECT_ECK(AreCodecsSupportedByKeySystem(
+ kVideoWebMMimeType, clear_key_exclusive_video_common_codecs(),
+ kClearKey));
// Non-video WebM codecs.
EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem(
@@ -606,6 +617,8 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesExternalClearKeyTest,
kVideoMP4MimeType, video_mp4_codecs(), kExternalClearKey));
EXPECT_ECK_PROPRIETARY(AreCodecsSupportedByKeySystem(
kVideoMP4MimeType, video_common_codecs(), kExternalClearKey));
+ EXPECT_ECK_PROPRIETARY(AreCodecsSupportedByKeySystem(
+ kVideoMP4MimeType, clear_key_exclusive_video_common_codecs(), kClearKey));
// High 10-bit Profile is not supported when using ExternalClearKey.
EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem(
@@ -693,6 +706,9 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Video_WebM) {
kVideoWebMMimeType, audio_webm_codecs(), kWidevine));
// Invalid or non-Webm codecs.
+ EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem(
+ kVideoWebMMimeType, clear_key_exclusive_video_common_codecs(),
+ kWidevine));
EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem(
kVideoWebMMimeType, invalid_codecs(), kWidevine));
EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem(
@@ -735,6 +751,8 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Video_MP4) {
kVideoMP4MimeType, audio_mp4_codecs(), kWidevine));
// Invalid or non-MP4 codecs.
+ EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem(
+ kVideoMP4MimeType, clear_key_exclusive_video_common_codecs(), kWidevine));
EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem(
kVideoMP4MimeType, invalid_codecs(), kWidevine));
EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem(
« no previous file with comments | « no previous file | content/browser/media/media_canplaytype_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698