Single PSSH entitlement handling
[ Merge of http://go/wvgerrit/78425 ] This CL refactors code, corrects comments and adds additional integration tests. Bug: 128462397 Test: WV unit/integration tests, GPlay playback tests and GtsMediaDrmTests Change-Id: I679960d44c45cf4ff13c27eb960e66ec63f491b5
This commit is contained in:
@@ -425,10 +425,12 @@ CdmResponseType CdmSession::GenerateKeyRequestInternal(
|
||||
case kLicenseTypeRelease:
|
||||
is_release_ = true;
|
||||
break;
|
||||
// TODO(jfore): CdmSession assumes a call to this method once a license has
|
||||
// been received is a call to generate a license renewal message. Use of
|
||||
// this enum differentiates the two calls. See "else if (license_received_)"
|
||||
// below.
|
||||
// TODO(b/132071885): Once a license has been received, CdmSession assumes
|
||||
// that a call to this method is to generate a license renewal/release
|
||||
// or key rotation. Key rotation can be indicated by specifing a license
|
||||
// type kLicenseTypeEmbeddedKeyData or interrogating the PSSH
|
||||
// (See "else if (license_received_)" below). b/132071885 is to evaluate
|
||||
// whether both mechanisms are needed.
|
||||
case kLicenseTypeEmbeddedKeyData:
|
||||
return license_parser_->HandleEmbeddedKeyData(init_data);
|
||||
default:
|
||||
@@ -441,7 +443,7 @@ CdmResponseType CdmSession::GenerateKeyRequestInternal(
|
||||
return GenerateReleaseRequest(key_request);
|
||||
} else if (license_received_) {
|
||||
// A call to GenerateKeyRequest after the initial license has been received
|
||||
// is either a renewal request or a key rotation event
|
||||
// is either a renewal/release request or a key rotation event
|
||||
if (init_data.contains_entitled_keys())
|
||||
return license_parser_->HandleEmbeddedKeyData(init_data);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user