Added CDM support for Watermarking reporting.
[ Merge of http://go/wvgerrit/148552 ] Extended the CDM layer to report OEMCrypto's watermarking support. The reporting of watermarking comes in three (3) mechanisms: 1) ClientCapabilities in license requests 2) CryptoSession metrics when queried to OEMCrypto 3) String property query by apps If OEMCrypto implementents OEMCrypto_GetWatermarkingSupport(), then the reported watermarking support by the CDM will match that of OEMCrypto. If OEMCrypto does not implement OEMCrypto_GetWatermarkingSupport() or an error occurs, it is assumed that OEMCrypto does not support watermarking, and the CDM will report "Not Supported". Bug: 226443788 Test: run_x86_64_tests request_license_test and license_unittest Change-Id: Id929a356c395e6bcf45d371ee6887eec40d35329
This commit is contained in:
@@ -343,6 +343,28 @@ CdmResponseType ClientIdentification::Prepare(
|
||||
}
|
||||
}
|
||||
|
||||
if (is_license_request_) {
|
||||
CdmWatermarkingSupport support;
|
||||
if (!crypto_session_->GetWatermarkingSupport(&support)) {
|
||||
// Assume not supported.
|
||||
support = kWatermarkingNotSupported;
|
||||
}
|
||||
switch (support) {
|
||||
case kWatermarkingNotSupported:
|
||||
client_capabilities->set_watermarking_support(
|
||||
ClientCapabilities::WATERMARKING_NOT_SUPPORTED);
|
||||
break;
|
||||
case kWatermarkingConfigurable:
|
||||
client_capabilities->set_watermarking_support(
|
||||
ClientCapabilities::WATERMARKING_CONFIGURABLE);
|
||||
break;
|
||||
case kWatermarkingAlwaysOn:
|
||||
client_capabilities->set_watermarking_support(
|
||||
ClientCapabilities::WATERMARKING_ALWAYS_ON);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user