Commit 538ee12b authored by jrummell's avatar jrummell Committed by Commit bot

Remove CDM_7 support

All CDMs released since M43 support the CDM_8 interface, so remove
support for CDM_7 as it is no longer used.

BUG=640437
TEST=browser_tests pass

Review-Url: https://codereview.chromium.org/2280433002
Cr-Commit-Position: refs/heads/master@{#414471}
parent bcfe7241
......@@ -246,7 +246,7 @@ deps = {
Var('chromium_git') + '/external/github.com/google/pywebsocket.git' + '@' + '2d7b73c3acbd0f41dcab487ae5c97c6feae06ce2',
'src/media/cdm/api':
Var('chromium_git') + '/chromium/cdm.git' + '@' + '245af7782c9f54d776722a2c7b53372ee040e5fc',
Var('chromium_git') + '/chromium/cdm.git' + '@' + '6a62dcef02523e2d5be4defb68a7d9363c7389d2',
'src/third_party/mesa/src':
Var('chromium_git') + '/chromium/deps/mesa.git' + '@' + 'ef811c6bd4de74e13e7035ca882cc77f85793fef',
......
......@@ -307,9 +307,8 @@ void* GetCdmHost(int host_interface_version, void* user_data) {
// Current version is supported.
IsSupportedCdmHostVersion(cdm::Host_8::kVersion) &&
// Include all previous supported versions (if any) here.
IsSupportedCdmHostVersion(cdm::Host_7::kVersion) &&
// One older than the oldest supported version is not supported.
!IsSupportedCdmHostVersion(cdm::Host_7::kVersion - 1));
!IsSupportedCdmHostVersion(cdm::Host_8::kVersion - 1));
DCHECK(IsSupportedCdmHostVersion(host_interface_version));
CdmAdapter* cdm_adapter = static_cast<CdmAdapter*>(user_data);
......@@ -317,8 +316,6 @@ void* GetCdmHost(int host_interface_version, void* user_data) {
switch (host_interface_version) {
case cdm::Host_8::kVersion:
return static_cast<cdm::Host_8*>(cdm_adapter);
case cdm::Host_7::kVersion:
return static_cast<cdm::Host_7*>(cdm_adapter);
default:
NOTREACHED() << "Unexpected host interface version "
<< host_interface_version;
......
......@@ -47,7 +47,6 @@ using CreateCdmFileIOCB =
class MEDIA_EXPORT CdmAdapter : public MediaKeys,
public CdmContext,
public Decryptor,
NON_EXPORTED_BASE(public cdm::Host_7),
NON_EXPORTED_BASE(public cdm::Host_8) {
public:
// Create the CDM using |cdm_path| and initialize it using |key_system| and
......@@ -110,7 +109,7 @@ class MEDIA_EXPORT CdmAdapter : public MediaKeys,
void ResetDecoder(StreamType stream_type) final;
void DeinitializeDecoder(StreamType stream_type) final;
// cdm::Host_7 and cdm::Host_8 implementation.
// cdm::Host_8 implementation.
cdm::Buffer* Allocate(uint32_t capacity) override;
void SetTimer(int64_t delay_ms, void* context) override;
cdm::Time GetCurrentWallTime() override;
......
......@@ -246,39 +246,6 @@ class CdmWrapperImpl : public CdmWrapper {
DISALLOW_COPY_AND_ASSIGN(CdmWrapperImpl);
};
// Overrides for the cdm::Host_7 methods.
// TODO(jrummell): Remove these once Host_7 interface is removed.
template <>
void CdmWrapperImpl<cdm::ContentDecryptionModule_7>::Initialize(
bool allow_distinctive_identifier,
bool allow_persistent_state) {}
template <>
void CdmWrapperImpl<cdm::ContentDecryptionModule_7>::
CreateSessionAndGenerateRequest(uint32_t promise_id,
cdm::SessionType session_type,
cdm::InitDataType init_data_type,
const uint8_t* init_data,
uint32_t init_data_size) {
std::string init_data_type_as_string = "unknown";
switch (init_data_type) {
case cdm::kCenc:
init_data_type_as_string = "cenc";
break;
case cdm::kKeyIds:
init_data_type_as_string = "keyids";
break;
case cdm::kWebM:
init_data_type_as_string = "webm";
break;
}
cdm_->CreateSessionAndGenerateRequest(
promise_id, session_type, &init_data_type_as_string[0],
init_data_type_as_string.length(), init_data, init_data_size);
}
CdmWrapper* CdmWrapper::Create(CreateCdmFunc create_cdm_func,
const char* key_system,
uint32_t key_system_size,
......@@ -296,10 +263,8 @@ CdmWrapper* CdmWrapper::Create(CreateCdmFunc create_cdm_func,
cdm::ContentDecryptionModule_8::kVersion + 1) &&
IsSupportedCdmInterfaceVersion(
cdm::ContentDecryptionModule_8::kVersion) &&
IsSupportedCdmInterfaceVersion(
cdm::ContentDecryptionModule_7::kVersion) &&
!IsSupportedCdmInterfaceVersion(
cdm::ContentDecryptionModule_7::kVersion - 1));
cdm::ContentDecryptionModule_8::kVersion - 1));
// Try to create the CDM using the latest CDM interface version.
CdmWrapper* cdm_wrapper =
......@@ -307,14 +272,6 @@ CdmWrapper* CdmWrapper::Create(CreateCdmFunc create_cdm_func,
create_cdm_func, key_system, key_system_size, get_cdm_host_func,
user_data);
// If |cdm_wrapper| is NULL, try to create the CDM using older supported
// versions of the CDM interface here.
if (!cdm_wrapper) {
cdm_wrapper = CdmWrapperImpl<cdm::ContentDecryptionModule_7>::Create(
create_cdm_func, key_system, key_system_size, get_cdm_host_func,
user_data);
}
return cdm_wrapper;
}
......
......@@ -1268,9 +1268,8 @@ void* GetCdmHost(int host_interface_version, void* user_data) {
// Current version is supported.
IsSupportedCdmHostVersion(cdm::Host_8::kVersion) &&
// Include all previous supported versions (if any) here.
IsSupportedCdmHostVersion(cdm::Host_7::kVersion) &&
// One older than the oldest supported version is not supported.
!IsSupportedCdmHostVersion(cdm::Host_7::kVersion - 1));
!IsSupportedCdmHostVersion(cdm::Host_8::kVersion - 1));
PP_DCHECK(IsSupportedCdmHostVersion(host_interface_version));
PpapiCdmAdapter* cdm_adapter = static_cast<PpapiCdmAdapter*>(user_data);
......@@ -1278,8 +1277,6 @@ void* GetCdmHost(int host_interface_version, void* user_data) {
switch (host_interface_version) {
case cdm::Host_8::kVersion:
return static_cast<cdm::Host_8*>(cdm_adapter);
case cdm::Host_7::kVersion:
return static_cast<cdm::Host_7*>(cdm_adapter);
default:
PP_NOTREACHED();
return NULL;
......
......@@ -38,7 +38,6 @@ void* GetCdmHost(int host_interface_version, void* user_data);
// Content Decryption Module (CDM).
class PpapiCdmAdapter : public pp::Instance,
public pp::ContentDecryptor_Private,
public cdm::Host_7,
public cdm::Host_8 {
public:
PpapiCdmAdapter(PP_Instance instance, pp::Module* module);
......@@ -86,7 +85,7 @@ class PpapiCdmAdapter : public pp::Instance,
pp::Buffer_Dev encrypted_buffer,
const PP_EncryptedBlockInfo& encrypted_block_info) override;
// cdm::Host_7 and cdm::Host_8 implementation.
// cdm::Host_8 implementation.
cdm::Buffer* Allocate(uint32_t capacity) override;
void SetTimer(int64_t delay_ms, void* context) override;
cdm::Time GetCurrentWallTime() override;
......
......@@ -25,7 +25,6 @@ bool IsSupportedCdmInterfaceVersion(int version) {
switch (version) {
// Supported versions in decreasing order.
case cdm::ContentDecryptionModule_8::kVersion:
case cdm::ContentDecryptionModule_7::kVersion:
return true;
default:
return false;
......@@ -39,7 +38,6 @@ bool IsSupportedCdmHostVersion(int version) {
switch (version) {
// Supported versions in decreasing order.
case cdm::Host_8::kVersion:
case cdm::Host_7::kVersion:
return true;
default:
return false;
......
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