Commit 3467f088 authored by jrummell's avatar jrummell Committed by Commit bot

Remove CDM_5 Support

As we never shipped a CDM based on CDM_5, we can remove the code.
CDM_4 will be removed later, once all clients are upgraded to CDM_6.

BUG=401815
TEST=existing EME tests still pass

Review URL: https://codereview.chromium.org/518353002

Cr-Commit-Position: refs/heads/master@{#292754}
parent 3c2889b0
...@@ -387,7 +387,7 @@ void CdmAdapter::CloseSession(uint32_t promise_id, ...@@ -387,7 +387,7 @@ void CdmAdapter::CloseSession(uint32_t promise_id,
const std::string& web_session_id) { const std::string& web_session_id) {
if (!cdm_->CloseSession( if (!cdm_->CloseSession(
promise_id, web_session_id.data(), web_session_id.length())) { promise_id, web_session_id.data(), web_session_id.length())) {
// CDM_4 and CDM_5 don't support this method, so reject the promise. // CDM_4 doesn't support this method, so reject the promise.
RejectPromise(promise_id, cdm::kNotSupportedError, 0, "Not implemented."); RejectPromise(promise_id, cdm::kNotSupportedError, 0, "Not implemented.");
} }
} }
...@@ -402,7 +402,7 @@ void CdmAdapter::GetUsableKeyIds(uint32_t promise_id, ...@@ -402,7 +402,7 @@ void CdmAdapter::GetUsableKeyIds(uint32_t promise_id,
const std::string& web_session_id) { const std::string& web_session_id) {
if (!cdm_->GetUsableKeyIds( if (!cdm_->GetUsableKeyIds(
promise_id, web_session_id.data(), web_session_id.length())) { promise_id, web_session_id.data(), web_session_id.length())) {
// CDM_4 and CDM_5 don't support this method, so reject the promise. // CDM_4 doesn't support this method, so reject the promise.
RejectPromise(promise_id, cdm::kNotSupportedError, 0, "Not implemented."); RejectPromise(promise_id, cdm::kNotSupportedError, 0, "Not implemented.");
} }
} }
...@@ -604,7 +604,7 @@ void CdmAdapter::TimerExpired(int32_t result, void* context) { ...@@ -604,7 +604,7 @@ void CdmAdapter::TimerExpired(int32_t result, void* context) {
// cdm::Host_4 methods // cdm::Host_4 methods
double CdmAdapter::GetCurrentWallTimeInSeconds() { double CdmAdapter::GetCurrentWallTimeInSeconds() {
return GetCurrentTime(); return GetCurrentWallTime();
} }
void CdmAdapter::OnSessionCreated(uint32_t session_id, void CdmAdapter::OnSessionCreated(uint32_t session_id,
...@@ -635,7 +635,8 @@ void CdmAdapter::OnSessionReady(uint32_t session_id) { ...@@ -635,7 +635,8 @@ void CdmAdapter::OnSessionReady(uint32_t session_id) {
OnResolvePromise(promise_id); OnResolvePromise(promise_id);
} else { } else {
std::string web_session_id = cdm_->LookupWebSessionId(session_id); std::string web_session_id = cdm_->LookupWebSessionId(session_id);
OnSessionReady(web_session_id.data(), web_session_id.length()); PostOnMain(callback_factory_.NewCallback(
&CdmAdapter::SendSessionReadyInternal, web_session_id));
} }
} }
...@@ -685,27 +686,12 @@ void CdmAdapter::OnSessionError(uint32_t session_id, ...@@ -685,27 +686,12 @@ void CdmAdapter::OnSessionError(uint32_t session_id,
} }
} }
// cdm::Host_5 and cdm::Host_6 methods // cdm::Host_6 methods
cdm::Time CdmAdapter::GetCurrentTime() {
return GetCurrentWallTime();
}
cdm::Time CdmAdapter::GetCurrentWallTime() { cdm::Time CdmAdapter::GetCurrentWallTime() {
return pp::Module::Get()->core()->GetTime(); return pp::Module::Get()->core()->GetTime();
} }
void CdmAdapter::OnResolvePromise(uint32_t promise_id) {
PostOnMain(callback_factory_.NewCallback(
&CdmAdapter::SendPromiseResolvedInternal, promise_id));
// CDM_5 doesn't support OnSessionKeysChange(), so simulate one if requested.
// Passing "true" which may result in false positives for retrying.
std::string session_id;
if (cdm_->SessionUsableKeysEventNeeded(promise_id, &session_id))
OnSessionKeysChange(session_id.data(), session_id.length(), true);
}
void CdmAdapter::OnResolveNewSessionPromise(uint32_t promise_id, void CdmAdapter::OnResolveNewSessionPromise(uint32_t promise_id,
const char* web_session_id, const char* web_session_id,
uint32_t web_session_id_length) { uint32_t web_session_id_length) {
...@@ -713,12 +699,11 @@ void CdmAdapter::OnResolveNewSessionPromise(uint32_t promise_id, ...@@ -713,12 +699,11 @@ void CdmAdapter::OnResolveNewSessionPromise(uint32_t promise_id,
&CdmAdapter::SendPromiseResolvedWithSessionInternal, &CdmAdapter::SendPromiseResolvedWithSessionInternal,
promise_id, promise_id,
std::string(web_session_id, web_session_id_length))); std::string(web_session_id, web_session_id_length)));
}
// CDM_5 doesn't support OnSessionKeysChange(), so simulate one if requested. void CdmAdapter::OnResolvePromise(uint32_t promise_id) {
// Passing "true" which may result in false positives for retrying. PostOnMain(callback_factory_.NewCallback(
std::string session_id; &CdmAdapter::SendPromiseResolvedInternal, promise_id));
if (cdm_->SessionUsableKeysEventNeeded(promise_id, &session_id))
OnSessionKeysChange(web_session_id, web_session_id_length, true);
} }
void CdmAdapter::OnResolveKeyIdsPromise(uint32_t promise_id, void CdmAdapter::OnResolveKeyIdsPromise(uint32_t promise_id,
...@@ -770,13 +755,6 @@ void CdmAdapter::OnSessionMessage(const char* web_session_id, ...@@ -770,13 +755,6 @@ void CdmAdapter::OnSessionMessage(const char* web_session_id,
std::string(destination_url, destination_url_length))); std::string(destination_url, destination_url_length)));
} }
void CdmAdapter::OnSessionKeysChange(const char* web_session_id,
uint32_t web_session_id_length,
bool has_additional_usable_key) {
OnSessionUsableKeysChange(
web_session_id, web_session_id_length, has_additional_usable_key);
}
void CdmAdapter::OnSessionUsableKeysChange(const char* web_session_id, void CdmAdapter::OnSessionUsableKeysChange(const char* web_session_id,
uint32_t web_session_id_length, uint32_t web_session_id_length,
bool has_additional_usable_key) { bool has_additional_usable_key) {
...@@ -795,13 +773,6 @@ void CdmAdapter::OnExpirationChange(const char* web_session_id, ...@@ -795,13 +773,6 @@ void CdmAdapter::OnExpirationChange(const char* web_session_id,
new_expiry_time)); new_expiry_time));
} }
void CdmAdapter::OnSessionReady(const char* web_session_id,
uint32_t web_session_id_length) {
PostOnMain(callback_factory_.NewCallback(
&CdmAdapter::SendSessionReadyInternal,
std::string(web_session_id, web_session_id_length)));
}
void CdmAdapter::OnSessionClosed(const char* web_session_id, void CdmAdapter::OnSessionClosed(const char* web_session_id,
uint32_t web_session_id_length) { uint32_t web_session_id_length) {
PostOnMain(callback_factory_.NewCallback( PostOnMain(callback_factory_.NewCallback(
...@@ -1312,7 +1283,7 @@ void* GetCdmHost(int host_interface_version, void* user_data) { ...@@ -1312,7 +1283,7 @@ void* GetCdmHost(int host_interface_version, void* user_data) {
// Current version is supported. // Current version is supported.
IsSupportedCdmHostVersion(cdm::Host_6::kVersion) && IsSupportedCdmHostVersion(cdm::Host_6::kVersion) &&
// Include all previous supported versions (if any) here. // Include all previous supported versions (if any) here.
IsSupportedCdmHostVersion(cdm::Host_5::kVersion) && // Host_5 is not supported.
IsSupportedCdmHostVersion(cdm::Host_4::kVersion) && IsSupportedCdmHostVersion(cdm::Host_4::kVersion) &&
// One older than the oldest supported version is not supported. // One older than the oldest supported version is not supported.
!IsSupportedCdmHostVersion(cdm::Host_4::kVersion - 1)); !IsSupportedCdmHostVersion(cdm::Host_4::kVersion - 1));
...@@ -1323,8 +1294,6 @@ void* GetCdmHost(int host_interface_version, void* user_data) { ...@@ -1323,8 +1294,6 @@ void* GetCdmHost(int host_interface_version, void* user_data) {
switch (host_interface_version) { switch (host_interface_version) {
case cdm::Host_4::kVersion: case cdm::Host_4::kVersion:
return static_cast<cdm::Host_4*>(cdm_adapter); return static_cast<cdm::Host_4*>(cdm_adapter);
case cdm::Host_5::kVersion:
return static_cast<cdm::Host_5*>(cdm_adapter);
case cdm::Host_6::kVersion: case cdm::Host_6::kVersion:
return static_cast<cdm::Host_6*>(cdm_adapter); return static_cast<cdm::Host_6*>(cdm_adapter);
default: default:
......
...@@ -28,11 +28,6 @@ ...@@ -28,11 +28,6 @@
#include "ppapi/cpp/private/platform_verification.h" #include "ppapi/cpp/private/platform_verification.h"
#endif #endif
#if defined(GetCurrentTime)
// winbase.h defines this which messes up calls to Host_5::GetCurrentTime.
#undef GetCurrentTime
#endif
namespace media { namespace media {
// GetCdmHostFunc implementation. // GetCdmHostFunc implementation.
...@@ -43,7 +38,6 @@ void* GetCdmHost(int host_interface_version, void* user_data); ...@@ -43,7 +38,6 @@ void* GetCdmHost(int host_interface_version, void* user_data);
class CdmAdapter : public pp::Instance, class CdmAdapter : public pp::Instance,
public pp::ContentDecryptor_Private, public pp::ContentDecryptor_Private,
public cdm::Host_4, public cdm::Host_4,
public cdm::Host_5,
public cdm::Host_6 { public cdm::Host_6 {
public: public:
CdmAdapter(PP_Instance instance, pp::Module* module); CdmAdapter(PP_Instance instance, pp::Module* module);
...@@ -94,7 +88,7 @@ class CdmAdapter : public pp::Instance, ...@@ -94,7 +88,7 @@ class CdmAdapter : public pp::Instance,
pp::Buffer_Dev encrypted_buffer, pp::Buffer_Dev encrypted_buffer,
const PP_EncryptedBlockInfo& encrypted_block_info) OVERRIDE; const PP_EncryptedBlockInfo& encrypted_block_info) OVERRIDE;
// cdm::Host_4, cdm::Host_5 and cdm::Host_6 implementation. // cdm::Host_4 and cdm::Host_6 implementation.
virtual cdm::Buffer* Allocate(uint32_t capacity) OVERRIDE; virtual cdm::Buffer* Allocate(uint32_t capacity) OVERRIDE;
virtual void SetTimer(int64_t delay_ms, void* context) OVERRIDE; virtual void SetTimer(int64_t delay_ms, void* context) OVERRIDE;
...@@ -114,13 +108,16 @@ class CdmAdapter : public pp::Instance, ...@@ -114,13 +108,16 @@ class CdmAdapter : public pp::Instance,
cdm::MediaKeyError error_code, cdm::MediaKeyError error_code,
uint32_t system_code) OVERRIDE; uint32_t system_code) OVERRIDE;
// cdm::Host_5 implementation. // cdm::Host_6 implementation.
virtual cdm::Time GetCurrentTime() OVERRIDE; virtual cdm::Time GetCurrentWallTime() OVERRIDE;
virtual void OnResolveNewSessionPromise( virtual void OnResolveNewSessionPromise(
uint32_t promise_id, uint32_t promise_id,
const char* web_session_id, const char* web_session_id,
uint32_t web_session_id_length) OVERRIDE; uint32_t web_session_id_length) OVERRIDE;
virtual void OnResolvePromise(uint32_t promise_id) OVERRIDE; virtual void OnResolvePromise(uint32_t promise_id) OVERRIDE;
virtual void OnResolveKeyIdsPromise(uint32_t promise_id,
const cdm::BinaryData* usable_key_ids,
uint32_t usable_key_ids_length) OVERRIDE;
virtual void OnRejectPromise(uint32_t promise_id, virtual void OnRejectPromise(uint32_t promise_id,
cdm::Error error, cdm::Error error,
uint32_t system_code, uint32_t system_code,
...@@ -132,14 +129,13 @@ class CdmAdapter : public pp::Instance, ...@@ -132,14 +129,13 @@ class CdmAdapter : public pp::Instance,
uint32_t message_length, uint32_t message_length,
const char* destination_url, const char* destination_url,
uint32_t destination_url_length) OVERRIDE; uint32_t destination_url_length) OVERRIDE;
virtual void OnSessionKeysChange(const char* web_session_id, virtual void OnSessionUsableKeysChange(
uint32_t web_session_id_length, const char* web_session_id,
bool has_additional_usable_key) OVERRIDE; uint32_t web_session_id_length,
bool has_additional_usable_key) OVERRIDE;
virtual void OnExpirationChange(const char* web_session_id, virtual void OnExpirationChange(const char* web_session_id,
uint32_t web_session_id_length, uint32_t web_session_id_length,
cdm::Time new_expiry_time) OVERRIDE; cdm::Time new_expiry_time) OVERRIDE;
virtual void OnSessionReady(const char* web_session_id,
uint32_t web_session_id_length) OVERRIDE;
virtual void OnSessionClosed(const char* web_session_id, virtual void OnSessionClosed(const char* web_session_id,
uint32_t web_session_id_length) OVERRIDE; uint32_t web_session_id_length) OVERRIDE;
virtual void OnSessionError(const char* web_session_id, virtual void OnSessionError(const char* web_session_id,
...@@ -149,17 +145,7 @@ class CdmAdapter : public pp::Instance, ...@@ -149,17 +145,7 @@ class CdmAdapter : public pp::Instance,
const char* error_message, const char* error_message,
uint32_t error_message_length) OVERRIDE; uint32_t error_message_length) OVERRIDE;
// cdm::Host_6 implementation. // cdm::Host_4 and cdm::Host_6 implementation.
virtual cdm::Time GetCurrentWallTime() OVERRIDE;
virtual void OnResolveKeyIdsPromise(uint32_t promise_id,
const cdm::BinaryData* usable_key_ids,
uint32_t usable_key_ids_length) OVERRIDE;
virtual void OnSessionUsableKeysChange(
const char* web_session_id,
uint32_t web_session_id_length,
bool has_additional_usable_key) OVERRIDE;
// cdm::Host_4, cdm::Host_5 and cdm::Host_6 implementation.
virtual void SendPlatformChallenge(const char* service_id, virtual void SendPlatformChallenge(const char* service_id,
uint32_t service_id_length, uint32_t service_id_length,
const char* challenge, const char* challenge,
......
...@@ -103,11 +103,11 @@ class CdmWrapper { ...@@ -103,11 +103,11 @@ class CdmWrapper {
virtual std::string LookupWebSessionId(uint32_t session_id) = 0; virtual std::string LookupWebSessionId(uint32_t session_id) = 0;
virtual void DropWebSessionId(std::string web_session_id) = 0; virtual void DropWebSessionId(std::string web_session_id) = 0;
// Helper functions for the cdm::Host_4 and cdm::Host_5 methods. // Helper functions for the cdm::Host_4 methods.
// CDMs using cdm::Host_6 will call OnSessionUsableKeys() as necessary when // CDMs using cdm::Host_6 will call OnSessionUsableKeys() as necessary when
// resolving LoadSession() and UpdateSession(). This needs to be simulated // resolving LoadSession() and UpdateSession(). This needs to be simulated
// for the older CDMs. These must not be called for cdm::Host_6 and later. // for the older CDMs. These must not be called for cdm::Host_6 and later.
// TODO(jrummell): Remove these once Host_4 and Host_5 interfaces are removed. // TODO(jrummell): Remove these once Host_4 interface is removed.
// Query whether a SessionUsableKeys event is necessary for the specified // Query whether a SessionUsableKeys event is necessary for the specified
// |promise_id|. Returns true if needed and |web_session_id| is updated, // |promise_id|. Returns true if needed and |web_session_id| is updated,
...@@ -122,16 +122,16 @@ class CdmWrapper { ...@@ -122,16 +122,16 @@ class CdmWrapper {
const char* web_session_id, const char* web_session_id,
uint32_t web_session_id_size) = 0; uint32_t web_session_id_size) = 0;
// cdm::Host_6 introduces InputBuffer_2 (aka InputBuffer). cdm::Host_4 and // cdm::Host_6 introduces InputBuffer_2 (aka InputBuffer). cdm::Host_4
// cdm::Host_5 methods still use InputBuffer_1, so this helper function // methods still use InputBuffer_1, so this helper function
// converts InputBuffer_2 to InputBuffer_1. // converts InputBuffer_2 to InputBuffer_1.
// TODO(jrummell): Remove these once Host_4 and Host_5 interfaces are removed. // TODO(jrummell): Remove these once Host_4 interfaces is removed.
virtual void ConvertInputBuffer(const cdm::InputBuffer& v2, virtual void ConvertInputBuffer(const cdm::InputBuffer& v2,
cdm::InputBuffer_1* v1) = 0; cdm::InputBuffer_1* v1) = 0;
// Prior to CDM_6, |init_data_type| was a content type. This helper convererts // Prior to CDM_6, |init_data_type| was a content type. This helper convererts
// an |init_data_type| to a content type. // an |init_data_type| to a content type.
// TODO(sandersd): Remove once Host_4 and Host_5 interfaces are removed. // TODO(sandersd): Remove once Host_4 interface is removed.
virtual std::string ConvertInitDataTypeToContentType( virtual std::string ConvertInitDataTypeToContentType(
const std::string& init_data_type) const = 0; const std::string& init_data_type) const = 0;
...@@ -511,121 +511,6 @@ CdmWrapperImpl<cdm::ContentDecryptionModule_4>::DecryptAndDecodeSamples( ...@@ -511,121 +511,6 @@ CdmWrapperImpl<cdm::ContentDecryptionModule_4>::DecryptAndDecodeSamples(
return cdm_->DecryptAndDecodeSamples(buffer, audio_frames); return cdm_->DecryptAndDecodeSamples(buffer, audio_frames);
} }
// Overrides for the cdm::Host_5 methods.
// TODO(jrummell): Remove these once Host_5 interface is removed.
template <>
void CdmWrapperImpl<cdm::ContentDecryptionModule_5>::CreateSession(
uint32_t promise_id,
const char* init_data_type,
uint32_t init_data_type_size,
const uint8_t* init_data,
uint32_t init_data_size,
cdm::SessionType session_type) {
std::string converted_init_data_type = ConvertInitDataTypeToContentType(
std::string(init_data_type, init_data_type_size));
// TODO(jrummell): Remove this code once |session_type| is passed through
// Pepper. When removing, add the header back in for CDM4.
PP_DCHECK(session_type == cdm::kTemporary);
const char kPersistentSessionHeader[] = "PERSISTENT|";
if (HasHeader(init_data, init_data_size, kPersistentSessionHeader)) {
cdm_->CreateSession(promise_id,
converted_init_data_type.data(),
converted_init_data_type.length(),
init_data + strlen(kPersistentSessionHeader),
init_data_size - strlen(kPersistentSessionHeader),
cdm::kPersistent);
return;
}
cdm_->CreateSession(promise_id,
converted_init_data_type.data(),
converted_init_data_type.length(),
init_data,
init_data_size,
session_type);
}
template <>
void CdmWrapperImpl<cdm::ContentDecryptionModule_5>::LoadSession(
uint32_t promise_id,
const char* web_session_id,
uint32_t web_session_id_size) {
// As CDM_5 doesn't support OnSessionUsableKeysChange(), make sure to generate
// one when the promise is resolved. This may be overly aggressive.
SetSessionUsableKeysEventNeeded(
promise_id, web_session_id, web_session_id_size);
cdm_->LoadSession(promise_id, web_session_id, web_session_id_size);
}
template <>
void CdmWrapperImpl<cdm::ContentDecryptionModule_5>::UpdateSession(
uint32_t promise_id,
const char* web_session_id,
uint32_t web_session_id_size,
const uint8_t* response,
uint32_t response_size) {
// As CDM_5 doesn't support OnSessionUsableKeysChange(), make sure to generate
// one when the promise is resolved. This may be overly aggressive.
SetSessionUsableKeysEventNeeded(
promise_id, web_session_id, web_session_id_size);
cdm_->UpdateSession(
promise_id, web_session_id, web_session_id_size, response, response_size);
}
template <>
bool CdmWrapperImpl<cdm::ContentDecryptionModule_5>::CloseSession(
uint32_t promise_id,
const char* web_session_id,
uint32_t web_session_id_size) {
return false;
}
template <>
void CdmWrapperImpl<cdm::ContentDecryptionModule_5>::RemoveSession(
uint32_t promise_id,
const char* web_session_id,
uint32_t web_session_id_size) {
cdm_->ReleaseSession(promise_id, web_session_id, web_session_id_size);
}
template <>
bool CdmWrapperImpl<cdm::ContentDecryptionModule_5>::GetUsableKeyIds(
uint32_t promise_id,
const char* web_session_id,
uint32_t web_session_id_size) {
return false;
}
template <>
cdm::Status CdmWrapperImpl<cdm::ContentDecryptionModule_5>::Decrypt(
const cdm::InputBuffer& encrypted_buffer,
cdm::DecryptedBlock* decrypted_buffer) {
cdm::InputBuffer_1 buffer;
ConvertInputBuffer(encrypted_buffer, &buffer);
return cdm_->Decrypt(buffer, decrypted_buffer);
}
template <>
cdm::Status
CdmWrapperImpl<cdm::ContentDecryptionModule_5>::DecryptAndDecodeFrame(
const cdm::InputBuffer& encrypted_buffer,
cdm::VideoFrame* video_frame) {
cdm::InputBuffer_1 buffer;
ConvertInputBuffer(encrypted_buffer, &buffer);
return cdm_->DecryptAndDecodeFrame(buffer, video_frame);
}
template <>
cdm::Status
CdmWrapperImpl<cdm::ContentDecryptionModule_5>::DecryptAndDecodeSamples(
const cdm::InputBuffer& encrypted_buffer,
cdm::AudioFrames* audio_frames) {
cdm::InputBuffer_1 buffer;
ConvertInputBuffer(encrypted_buffer, &buffer);
return cdm_->DecryptAndDecodeSamples(buffer, audio_frames);
}
CdmWrapper* CdmWrapper::Create(const char* key_system, CdmWrapper* CdmWrapper::Create(const char* key_system,
uint32_t key_system_size, uint32_t key_system_size,
GetCdmHostFunc get_cdm_host_func, GetCdmHostFunc get_cdm_host_func,
...@@ -656,11 +541,6 @@ CdmWrapper* CdmWrapper::Create(const char* key_system, ...@@ -656,11 +541,6 @@ CdmWrapper* CdmWrapper::Create(const char* key_system,
// If |cdm_wrapper| is NULL, try to create the CDM using older supported // If |cdm_wrapper| is NULL, try to create the CDM using older supported
// versions of the CDM interface. // versions of the CDM interface.
cdm_wrapper = CdmWrapperImpl<cdm::ContentDecryptionModule_5>::Create(
key_system, key_system_size, get_cdm_host_func, user_data);
if (cdm_wrapper)
return cdm_wrapper;
cdm_wrapper = CdmWrapperImpl<cdm::ContentDecryptionModule_4>::Create( cdm_wrapper = CdmWrapperImpl<cdm::ContentDecryptionModule_4>::Create(
key_system, key_system_size, get_cdm_host_func, user_data); key_system, key_system_size, get_cdm_host_func, user_data);
return cdm_wrapper; return cdm_wrapper;
......
...@@ -26,7 +26,6 @@ bool IsSupportedCdmInterfaceVersion(int version) { ...@@ -26,7 +26,6 @@ bool IsSupportedCdmInterfaceVersion(int version) {
switch(version) { switch(version) {
// Supported versions in decreasing order. // Supported versions in decreasing order.
case cdm::ContentDecryptionModule_6::kVersion: case cdm::ContentDecryptionModule_6::kVersion:
case cdm::ContentDecryptionModule_5::kVersion:
case cdm::ContentDecryptionModule_4::kVersion: case cdm::ContentDecryptionModule_4::kVersion:
return true; return true;
default: default:
...@@ -41,7 +40,6 @@ bool IsSupportedCdmHostVersion(int version) { ...@@ -41,7 +40,6 @@ bool IsSupportedCdmHostVersion(int version) {
switch(version) { switch(version) {
// Supported versions in decreasing order. // Supported versions in decreasing order.
case cdm::Host_6::kVersion: case cdm::Host_6::kVersion:
case cdm::Host_5::kVersion:
case cdm::Host_4::kVersion: case cdm::Host_4::kVersion:
return true; return true;
default: default:
......
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