Merge changes I420fb181,Id0c38b45
* changes: Policy Engine refactoring Update license proto
This commit is contained in:
@@ -37,9 +37,6 @@ const std::string kEmptyString;
|
||||
namespace wvcdm {
|
||||
|
||||
// Protobuf generated classes.
|
||||
using video_widevine::ClientIdentification_ClientCapabilities;
|
||||
using video_widevine::ClientIdentification_NameValue;
|
||||
using video_widevine::DrmDeviceCertificate;
|
||||
using video_widevine::EncryptedClientIdentification;
|
||||
using video_widevine::License;
|
||||
using video_widevine::License_KeyContainer;
|
||||
@@ -47,10 +44,9 @@ using video_widevine::LicenseError;
|
||||
using video_widevine::LicenseIdentification;
|
||||
using video_widevine::LicenseRequest;
|
||||
using video_widevine::LicenseRequest_ContentIdentification;
|
||||
using video_widevine::LicenseRequest_ContentIdentification_CencDeprecated;
|
||||
using video_widevine::LicenseRequest_ContentIdentification_ExistingLicense;
|
||||
using video_widevine::LicenseRequest_ContentIdentification_WebmDeprecated;
|
||||
using video_widevine::SignedDrmDeviceCertificate;
|
||||
using video_widevine::LicenseRequest_ContentIdentification_WebmKeyId;
|
||||
using video_widevine::LicenseRequest_ContentIdentification_WidevinePsshData;
|
||||
using video_widevine::SignedMessage;
|
||||
|
||||
namespace {
|
||||
@@ -1052,31 +1048,31 @@ CdmResponseType CdmLicense::PrepareContentId(
|
||||
license_request->mutable_content_id();
|
||||
|
||||
if (init_data.is_cenc() || init_data.is_hls()) {
|
||||
LicenseRequest_ContentIdentification_CencDeprecated* cenc_content_id =
|
||||
content_id->mutable_cenc_id_deprecated();
|
||||
LicenseRequest_ContentIdentification_WidevinePsshData* widevine_pssh_data =
|
||||
content_id->mutable_widevine_pssh_data();
|
||||
|
||||
if (!init_data.IsEmpty()) {
|
||||
cenc_content_id->add_pssh(init_data.data());
|
||||
widevine_pssh_data->add_pssh_data(init_data.data());
|
||||
} else {
|
||||
LOGE("ISO-CENC init data not available");
|
||||
return CENC_INIT_DATA_UNAVAILABLE;
|
||||
}
|
||||
|
||||
if (!SetTypeAndId(license_type, request_id, cenc_content_id)) {
|
||||
if (!SetTypeAndId(license_type, request_id, widevine_pssh_data)) {
|
||||
return PREPARE_CENC_CONTENT_ID_FAILED;
|
||||
}
|
||||
} else if (init_data.is_webm()) {
|
||||
LicenseRequest_ContentIdentification_WebmDeprecated* webm_content_id =
|
||||
content_id->mutable_webm_id_deprecated();
|
||||
LicenseRequest_ContentIdentification_WebmKeyId* webm_key_id =
|
||||
content_id->mutable_webm_key_id();
|
||||
|
||||
if (!init_data.IsEmpty()) {
|
||||
webm_content_id->set_header(init_data.data());
|
||||
webm_key_id->set_header(init_data.data());
|
||||
} else {
|
||||
LOGE("WebM init data not available");
|
||||
return WEBM_INIT_DATA_UNAVAILABLE;
|
||||
}
|
||||
|
||||
if (!SetTypeAndId(license_type, request_id, webm_content_id)) {
|
||||
if (!SetTypeAndId(license_type, request_id, webm_key_id)) {
|
||||
return PREPARE_WEBM_CONTENT_ID_FAILED;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user