Support ATSC license installation

[ Merge of http://go/wvgerrit/163900/ ]

ATSC licenses can be saved by calling
MediaDrm#setPropertyString("storeAtscLicense",<value>)
where <value> is
"<atsc-key-set-ID>:<license-file-data in Base64 format>"

Before storing an ATSC license a session must be opened and the
ATSC mode must be enabled.

Use MediaDrm#setPropertyString("atscMode","enable");

Bug: 176871821
Test: WV Unit/integration/Luci tests
Test: libwvdrmdrmplugin_hal_test
Test: GtsMediaTestCases
Change-Id: Iec2a8b7f87b1122395d06856202278b92316fdfe
This commit is contained in:
Rahul Frias
2022-12-17 19:34:33 -08:00
parent 233bac3a6f
commit 1e15b36b1a
9 changed files with 388 additions and 0 deletions

View File

@@ -656,6 +656,15 @@ CdmResponseType WvContentDecryptionModule::GetSessionUserId(
return CdmResponseType(NO_ERROR);
}
CdmResponseType WvContentDecryptionModule::StoreAtscLicense(
const CdmIdentifier& identifier,
RequestedSecurityLevel requested_security_level,
const CdmKeySetId& key_set_id, const std::string& serialized_license_data) {
CdmEngine* cdm_engine = EnsureCdmForIdentifier(identifier);
return cdm_engine->StoreAtscLicense(requested_security_level, key_set_id,
serialized_license_data);
}
bool WvContentDecryptionModule::SetDefaultOtaKeyboxFallbackDurationRules() {
CdmEngine* cdm_engine = EnsureCdmForIdentifier(kDefaultCdmIdentifier);
if (!cdm_engine) return false;