Source release 18.1.0

This commit is contained in:
John "Juce" Bruce
2023-06-23 15:45:08 -07:00
parent 2baa7c6e2b
commit b2c35151ad
2074 changed files with 196004 additions and 427059 deletions

View File

@@ -88,7 +88,7 @@ class CdmEngine {
// request to.
virtual CdmResponseType GenerateKeyRequest(
const CdmSessionId& session_id, const CdmKeySetId& key_set_id,
const InitializationData& init_data, const CdmLicenseType license_type,
const InitializationData& init_data, CdmLicenseType license_type,
CdmAppParameterMap& app_parameters, CdmKeyRequest* key_request);
// This API may
// (a) accept license response, extract key info and load keys.
@@ -214,17 +214,17 @@ class CdmEngine {
// Return the list of IDs associated with usage records for the
// current (origin-specific) file system. At least one parameter
// |ksids| or |provider_session_tokens| needs to be supplied.
virtual CdmResponseType ListUsageIds(
const std::string& app_id, CdmSecurityLevel security_level,
std::vector<std::string>* ksids,
std::vector<std::string>* provider_session_tokens);
// |ksids| or |psts| needs to be supplied.
virtual CdmResponseType ListUsageIds(const std::string& app_id,
CdmSecurityLevel security_level,
std::vector<CdmKeySetId>* ksids,
std::vector<CdmSecureStopId>* psts);
// Delete the usage record for the given key_set_id. This removes the
// usage record in the file system and the OEMCrypto usage record.
virtual CdmResponseType DeleteUsageRecord(const std::string& app_id,
CdmSecurityLevel security_level,
const std::string& key_set_id);
const CdmKeySetId& key_set_id);
// Get offline license status: active, release or unknown
virtual CdmResponseType GetOfflineLicenseState(
@@ -235,13 +235,17 @@ class CdmEngine {
virtual CdmResponseType RemoveOfflineLicense(const std::string& key_set_id,
CdmSecurityLevel security_level);
virtual CdmResponseType StoreAtscLicense(
RequestedSecurityLevel security_level, const CdmKeySetId& key_set_id,
const std::string& serialized_license_data);
// Usage related methods for streaming licenses
// Retrieve a random usage info from the list of all usage infos for this app
// id. If |error_detail| is not null, an additional error code may be provided
// in the event of an error.
virtual CdmResponseType GetUsageInfo(const std::string& app_id,
int* error_detail,
CdmUsageInfo* usage_info);
CdmUsageReport* usage_report);
// Retrieve usage info whose PST is specified by |ssid|
// If |error_detail| is not null, an additional error code may be provided
@@ -249,7 +253,7 @@ class CdmEngine {
virtual CdmResponseType GetUsageInfo(const std::string& app_id,
const CdmSecureStopId& ssid,
int* error_detail,
CdmUsageInfo* usage_info);
CdmUsageReport* usage_report);
// Retrieve usage info for a given security level and whose
// PST is specified by |ssid|.
@@ -259,7 +263,7 @@ class CdmEngine {
const CdmSecureStopId& ssid,
RequestedSecurityLevel security_level,
int* error_detail,
CdmUsageInfo* usage_info);
CdmUsageReport* usage_report);
// Remove all usage records for the current origin.
virtual CdmResponseType RemoveAllUsageInfo(const std::string& app_id,
@@ -272,8 +276,7 @@ class CdmEngine {
virtual CdmResponseType RemoveUsageInfo(
const std::string& app_id, const CdmSecureStopId& secure_stop_id);
virtual CdmResponseType ReleaseUsageInfo(
const CdmUsageInfoReleaseMessage& message);
virtual CdmResponseType ReleaseUsageInfo(const CdmKeyResponse& message);
virtual CdmResponseType LoadUsageSession(const CdmKeySetId& key_set_id,
CdmKeyMessage* release_message);
@@ -415,12 +418,10 @@ class CdmEngine {
bool ValidateKeySystem(const CdmKeySystem& key_system);
CdmResponseType GetUsageInfo(const std::string& app_id,
RequestedSecurityLevel requested_security_level,
int* error_detail, CdmUsageInfo* usage_info);
int* error_detail, CdmUsageReport* usage_report);
void OnKeyReleaseEvent(const CdmKeySetId& key_set_id);
std::string MapHdcpVersion(CryptoSession::HdcpCapability version);
void CloseExpiredReleaseSessions();
// Returns "true" if |okp_provisioner_| should be checked.
@@ -458,7 +459,10 @@ class CdmEngine {
// API will release the handle to previously active secure stop license.
std::unique_ptr<CdmSession> usage_session_;
std::unique_ptr<UsagePropertySet> usage_property_set_;
int64_t last_usage_information_update_time_;
int64_t last_usage_information_update_time_ = 0;
// Should be acquired before changes to |usage_property_set_| or
// |usage_session_|.
std::mutex usage_session_mutex_;
// Protect release_key_sets_ from non-thread-safe operations.
std::mutex release_key_sets_lock_;