Commit 2cf74a83 authored by Haoming Chen's avatar Haoming Chen Committed by Commit Bot

media: Enable encrypted VP9 profile 2

With the new Widevine CDM, support for encrypted VP9 profile 2 has
been added. So change the supports_vp9_profile2 capability to true
for ChromeOS. Other OSes will get the VP9 profile 2 support from
the Widevine CDM manifest.

This changes also updates the browser tests expected result to SUCCESS
for VP9 profile 2.

Bug: 707128
Change-Id: Idfedd94c726afa22b538870eb103b1fdb6d51209
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1866011
Commit-Queue: Haoming Chen <hmchen@chromium.org>
Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarJohn Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708098}
parent 496b20b5
......@@ -581,13 +581,6 @@ IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoOnly_MP4_VP9) {
IN_PROC_BROWSER_TEST_P(EncryptedMediaTest,
Playback_VideoOnly_WebM_VP9Profile2) {
#if BUILDFLAG(ENABLE_WIDEVINE)
// TODO(crbug.com/707128): Update Widevine CDM to support VP9 profile 1/2/3.
if (IsWidevine(CurrentKeySystem())) {
DVLOG(0) << "Skipping test - Widevine CDM does not support VP9 profile 2";
return;
}
#endif
TestSimplePlayback("bear-320x240-v-vp9_profile2_subsample_cenc-v.webm");
}
......@@ -597,13 +590,6 @@ IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoOnly_MP4_VP9Profile2) {
DVLOG(0) << "Skipping test; Can only play MP4 encrypted streams by MSE.";
return;
}
#if BUILDFLAG(ENABLE_WIDEVINE)
// TODO(crbug.com/707128): Update Widevine CDM to support VP9 profile 1/2/3.
if (IsWidevine(CurrentKeySystem())) {
DVLOG(0) << "Skipping test - Widevine CDM does not support VP9 profile 2";
return;
}
#endif
TestSimplePlayback("bear-320x240-v-vp9_profile2_subsample_cenc-v.mp4");
}
......
......@@ -1007,6 +1007,8 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Video_WebM) {
video_webm_codecs()));
EXPECT_WV_SUCCESS(IsSupportedByKeySystem(kWidevine, kVideoWebMMimeType,
vp9_profile0_codecs()));
EXPECT_WV_SUCCESS(IsSupportedByKeySystem(kWidevine, kVideoWebMMimeType,
vp9_profile2_codecs()));
EXPECT_WV_AV1(
IsSupportedByKeySystem(kWidevine, kVideoWebMMimeType, av1_codecs()));
......@@ -1014,10 +1016,6 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Video_WebM) {
EXPECT_UNSUPPORTED(IsSupportedByKeySystem(kWidevine, kVideoWebMMimeType,
audio_webm_codecs()));
// TODO(crbug.com/996372): Change to EXPECT_WV_SUCCESS after new CDM is in.
EXPECT_ANY(IsSupportedByKeySystem(kWidevine, kVideoWebMMimeType,
vp9_profile2_codecs()));
// Invalid or non-Webm codecs.
EXPECT_UNSUPPORTED(
IsSupportedByKeySystem(kWidevine, kVideoWebMMimeType, invalid_codecs()));
......@@ -1055,6 +1053,8 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Video_MP4) {
IsSupportedByKeySystem(kWidevine, kVideoMP4MimeType, video_mp4_codecs()));
EXPECT_WV_SUCCESS(IsSupportedByKeySystem(kWidevine, kVideoMP4MimeType,
vp9_profile0_codecs()));
EXPECT_WV_SUCCESS(IsSupportedByKeySystem(kWidevine, kVideoMP4MimeType,
vp9_profile2_codecs()));
EXPECT_WV_AV1(
IsSupportedByKeySystem(kWidevine, kVideoMP4MimeType, av1_codecs()));
......@@ -1068,10 +1068,6 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Video_MP4) {
EXPECT_UNSUPPORTED(IsSupportedByKeySystem(kWidevine, kVideoMP4MimeType,
audio_mp4_flac_codecs()));
// TODO(crbug.com/996372): Change to EXPECT_WV_SUCCESS after new CDM is in.
EXPECT_ANY(IsSupportedByKeySystem(kWidevine, kVideoMP4MimeType,
vp9_profile2_codecs()));
// Invalid or non-MP4 codecs.
EXPECT_UNSUPPORTED(
IsSupportedByKeySystem(kWidevine, kVideoMP4MimeType, invalid_codecs()));
......
......@@ -411,9 +411,7 @@ std::unique_ptr<content::CdmInfo> CreateCdmInfoForChromeOS(
capability.video_codecs.push_back(media::VideoCodec::kCodecVP8);
capability.video_codecs.push_back(media::VideoCodec::kCodecVP9);
capability.video_codecs.push_back(media::VideoCodec::kCodecAV1);
// TODO(crbug.com/899403): Update this and tests after Widevine CDM supports
// VP9 profile 2.
capability.supports_vp9_profile2 = false;
capability.supports_vp9_profile2 = true;
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
capability.video_codecs.push_back(media::VideoCodec::kCodecH264);
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment