0

media: Enable support of CDM 11 interface by default

CDM 11 support development has been completed in Chromium. Mark it as
supported by default.

Bug: 353733810
Change-Id: I3732ce2852728e1835a1bc6dcd298ba40efe62dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6125894
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Auto-Submit: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Vikram Pasupathy <vpasupathy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1400534}
This commit is contained in:
Xiaohan Wang
2024-12-27 10:21:10 -08:00
committed by Chromium LUCI CQ
parent 690c7553c5
commit 7fd7637c6c
5 changed files with 39 additions and 3 deletions

2
DEPS

@ -1389,7 +1389,7 @@ deps = {
},
'src/media/cdm/api':
Var('chromium_git') + '/chromium/cdm.git' + '@' + '05d4084d7d5a65a422b36da4fa78f1d1740911c0',
Var('chromium_git') + '/chromium/cdm.git' + '@' + '06395a2863cb1ebdb47617a995b73f95c14fe120',
'src/native_client': {
'url': Var('chromium_git') + '/native_client/src/native_client.git' + '@' + Var('nacl_revision'),

@ -234,6 +234,7 @@ source_set("unit_tests") {
"simple_cdm_allocator_unittest.cc",
"simple_cdm_buffer.cc",
"simple_cdm_buffer.h",
"supported_cdm_versions_unittest.cc",
]
data_deps += [ "//media/cdm/library_cdm/clear_key_cdm" ]

@ -36,7 +36,7 @@ struct SupportedVersion {
constexpr std::array<SupportedVersion, 3> kSupportedCdmInterfaceVersions = {{
{10, true},
{11, false},
{11, true},
{12, false},
}};

@ -0,0 +1,35 @@
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/cdm/supported_cdm_versions.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
TEST(SupportedCdmVersions, IsSupportedCdmInterfaceVersion) {
EXPECT_FALSE(IsSupportedCdmInterfaceVersion(9));
EXPECT_TRUE(IsSupportedCdmInterfaceVersion(10));
EXPECT_TRUE(IsSupportedCdmInterfaceVersion(11));
EXPECT_TRUE(IsSupportedCdmInterfaceVersion(12));
EXPECT_FALSE(IsSupportedCdmInterfaceVersion(13));
}
TEST(SupportedCdmVersions, IsSupportedCdmHostVersion) {
EXPECT_FALSE(IsSupportedCdmHostVersion(9));
EXPECT_TRUE(IsSupportedCdmHostVersion(10));
EXPECT_TRUE(IsSupportedCdmHostVersion(11));
EXPECT_TRUE(IsSupportedCdmHostVersion(12));
EXPECT_FALSE(IsSupportedCdmHostVersion(13));
}
TEST(SupportedCdmVersions, IsSupportedAndEnabledCdmInterfaceVersion) {
EXPECT_FALSE(IsSupportedAndEnabledCdmInterfaceVersion(9));
EXPECT_TRUE(IsSupportedAndEnabledCdmInterfaceVersion(10));
EXPECT_TRUE(IsSupportedAndEnabledCdmInterfaceVersion(11));
EXPECT_FALSE(IsSupportedAndEnabledCdmInterfaceVersion(12));
EXPECT_FALSE(IsSupportedAndEnabledCdmInterfaceVersion(13));
}
} // namespace media