Generate key set ID on initialization and interface clean up
This is a merge of squashed CLs. * Cdm Session and Engine interface clean up [ Merge of http://go/wvgerrit/16387 ] Key Set Ids have been removed from the CdmSession interface (GenerateKeyRequest, Addkey) as they can be queried by an accessor. The CdmEngine interface now allows one to specify or retrieve a session ID, since both were not being used in a single call. Key set IDs are no longer returned though GenerateKeyRequest as they was not being used. * Generate key set ID when session is initialized [ Merge of http://go/wvgerrit/16370 ] Key set IDs are currently generated at different times in the CdmSession lifecycle. Android generates key set IDs when the license is received, while the CE CDM generates (or overrides them) when the session is constructed. The key set IDs are now generated when the session is initialized. Key set generation cannot occur earlier as it has a dependency on security level and in turn on crypto session initialization which occurs when the session is initialized. Depenencies on Session ID has caused other activities, construction of PolicyEngine, CdmLicense, setting property CDM client sets to be deferred from CdmSession constructor to Init(). Android will still retrieve the key set IDs after the offline license is processed. For streaming requests, the key set will be unreserved and discarded when the session is terminated. Change-Id: Ib802d1c043742d62efa9a2c901fcd113e836c33d
This commit is contained in:
@@ -231,12 +231,8 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) {
|
||||
break;
|
||||
case LICENSE_RENEWAL_SIGNING_ERROR: *os << "LICENSE_RENEWAL_SIGNING_ERROR";
|
||||
break;
|
||||
case RESTORE_OFFLINE_LICENSE_ERROR_1: *os << "RESTORE_OFFLINE_LICENSE_ERROR_1";
|
||||
break;
|
||||
case RESTORE_OFFLINE_LICENSE_ERROR_2: *os << "RESTORE_OFFLINE_LICENSE_ERROR_2";
|
||||
break;
|
||||
case SESSION_INIT_ERROR_1: *os << "SESSION_INIT_ERROR_1";
|
||||
break;
|
||||
case SESSION_INIT_ERROR_2: *os << "SESSION_INIT_ERROR_2";
|
||||
break;
|
||||
case SESSION_INIT_GET_KEYBOX_ERROR: *os << "SESSION_INIT_GET_KEYBOX_ERROR";
|
||||
@@ -271,8 +267,6 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) {
|
||||
break;
|
||||
case STORE_LICENSE_ERROR_2: *os << "STORE_LICENSE_ERROR_2";
|
||||
break;
|
||||
case STORE_LICENSE_ERROR_3: *os << "STORE_LICENSE_ERROR_3";
|
||||
break;
|
||||
case STORE_USAGE_INFO_ERROR: *os << "STORE_USAGE_INFO_ERROR";
|
||||
break;
|
||||
case UNPROVISION_ERROR_1: *os << "UNPROVISION_ERROR_1";
|
||||
@@ -339,6 +333,7 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) {
|
||||
break;
|
||||
case DUPLICATE_SESSION_ID_SPECIFIED: *os << "DUPLICATE_SESSION_ID_SPECIFIED";
|
||||
case LICENSE_RENEWAL_PROHIBITED: *os << "LICENSE_RENEWAL_PROHIBITED";
|
||||
case SESSION_FILE_HANDLE_INIT_ERROR: *os << "SESSION_FILE_HANDLE_INIT_ERROR";
|
||||
break;
|
||||
default:
|
||||
*os << "Unknown CdmResponseType";
|
||||
|
||||
Reference in New Issue
Block a user