Source release v3.4.1
This commit is contained in:
@@ -88,7 +88,6 @@
|
||||
'../core/include',
|
||||
'../oemcrypto/include',
|
||||
'../third_party/jsmn',
|
||||
'../third_party/stringencoders/src',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
@@ -141,12 +140,6 @@
|
||||
'../core/src/string_conversions.cpp',
|
||||
'../third_party/jsmn/jsmn.h',
|
||||
'../third_party/jsmn/jsmn.c',
|
||||
'../third_party/stringencoders/src/modp_b64_data.h',
|
||||
'../third_party/stringencoders/src/modp_b64.cpp',
|
||||
'../third_party/stringencoders/src/modp_b64.h',
|
||||
'../third_party/stringencoders/src/modp_b64w_data.h',
|
||||
'../third_party/stringencoders/src/modp_b64w.cpp',
|
||||
'../third_party/stringencoders/src/modp_b64w.h',
|
||||
],
|
||||
'conditions': [
|
||||
['oemcrypto_version < 9', {
|
||||
|
||||
@@ -61,6 +61,8 @@ class CDM_EXPORT Cdm : public ITimerClient {
|
||||
kLicenseRelease = 2,
|
||||
kIndividualizationRequest = 3, // Not used. Direct Individualization
|
||||
// is used instead of App-Assisted
|
||||
kLicenseSub = 4 // Used in loading sub licenses from
|
||||
// embedded key data.
|
||||
} MessageType;
|
||||
|
||||
// Status codes returned by CDM functions.
|
||||
@@ -421,6 +423,11 @@ class CDM_EXPORT Cdm : public ITimerClient {
|
||||
// Loads an existing persisted session from storage.
|
||||
virtual Status load(const std::string& session_id) = 0;
|
||||
|
||||
// Loads a new sublicense as specified in init_data.
|
||||
virtual Status load(const std::string& session_id,
|
||||
InitDataType init_data_type,
|
||||
const std::string& init_data) = 0;
|
||||
|
||||
// Provides messages, including licenses, to the CDM.
|
||||
// If the message is a successful response to a release message, stored
|
||||
// session data will be removed for the session.
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// Widevine CE CDM Version
|
||||
#define CDM_VERSION "v3.3.0-0-gffcfda19-ce"
|
||||
#define CDM_VERSION "v3.4.1-0-gb429ebdf-ce"
|
||||
|
||||
@@ -146,6 +146,10 @@ class CdmImpl : public Cdm,
|
||||
|
||||
virtual Status load(const std::string& session_id) OVERRIDE;
|
||||
|
||||
virtual Status load(const std::string& session_id,
|
||||
InitDataType init_data_type,
|
||||
const std::string& init_data) OVERRIDE;
|
||||
|
||||
virtual Status update(const std::string& session_id,
|
||||
const std::string& response) OVERRIDE;
|
||||
|
||||
@@ -613,6 +617,38 @@ Cdm::Status CdmImpl::load(const std::string& session_id) {
|
||||
return kSuccess;
|
||||
}
|
||||
|
||||
Cdm::Status CdmImpl::load(const std::string& session_id,
|
||||
InitDataType init_data_type,
|
||||
const std::string& init_data) {
|
||||
if (!cdm_engine_.IsOpenSession(session_id)) {
|
||||
LOGE("Session %s does not exist.", session_id.c_str());
|
||||
return kSessionNotFound;
|
||||
}
|
||||
|
||||
if (init_data_type != kCenc) {
|
||||
LOGE("Invalid init data type: %d", init_data_type);
|
||||
return kTypeError;
|
||||
}
|
||||
|
||||
InitializationData init_data_obj(CENC_INIT_DATA_FORMAT, init_data);
|
||||
if (init_data_obj.IsEmpty()) {
|
||||
// Note that InitializationData's idea of "empty" includes "failed to find
|
||||
// and parse a Widevine PSSH". This should not happen for WebM init data,
|
||||
// which requires no parsing.
|
||||
LOGE("Failed to parse init data, may not contain a Widevine PSSH.");
|
||||
return kNotSupported;
|
||||
}
|
||||
|
||||
CdmKeyRequest key_request;
|
||||
CdmResponseType result = cdm_engine_.GenerateKeyRequest(
|
||||
session_id, session_id, init_data_obj, kLicenseTypeSubSession,
|
||||
app_parameters_, &key_request);
|
||||
if (result != KEY_MESSAGE) {
|
||||
return kUnexpectedError;
|
||||
}
|
||||
return kSuccess;
|
||||
}
|
||||
|
||||
Cdm::Status CdmImpl::update(const std::string& session_id,
|
||||
const std::string& response) {
|
||||
if (provision_request_sent_) {
|
||||
|
||||
@@ -76,6 +76,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
#if defined(OEMCRYPTO_TESTS)
|
||||
// Set up the OEMCrypto test harness.
|
||||
// NOTE: This creates a temporary OEMCrypto "instance".
|
||||
wvoec::global_features.Initialize(false /* is_cast_receiver */,
|
||||
false /* force_load_test_keybox */);
|
||||
::testing::GTEST_FLAG(filter)
|
||||
|
||||
Reference in New Issue
Block a user