Source release 15.1.0

This commit is contained in:
John W. Bruce
2019-03-29 18:16:05 -07:00
parent 66628486b5
commit 2b26dee09c
44 changed files with 1371 additions and 356 deletions

View File

@@ -325,8 +325,7 @@ class CdmEngine {
// data. Returns true if the metrics data is populated, false otherwise.
// |engine_metrics| is owned by the caller and must not be null.
// The CdmEngine implementation is a placeholder. Just return false.
virtual bool GetMetricsSnapshot(
__attribute__((unused)) drm_metrics::WvCdmMetrics *metrics) {
virtual bool GetMetricsSnapshot(drm_metrics::WvCdmMetrics* /* metrics */) {
return false;
}

View File

@@ -21,7 +21,7 @@ class EntitlementKeySession : public ContentKeySession {
metrics::CryptoMetrics* metrics);
~EntitlementKeySession() override {}
KeySessionType Type() { return kEntitlement; }
KeySessionType Type() override { return kEntitlement; }
// Load Keys for ContentKeySession
OEMCryptoResult LoadKeys(const std::string& message,

View File

@@ -17,6 +17,7 @@
namespace video_widevine {
class SignedMessage;
class LicenseRequest;
class VersionInfo;
} // namespace video_widevine
namespace wvcdm {
@@ -29,6 +30,7 @@ class CryptoKey;
using ::google::protobuf::RepeatedPtrField;
using video_widevine::License_KeyContainer;
using video_widevine::VersionInfo;
using video_widevine::WidevinePsshData_EntitledKey;
class CdmLicense {
@@ -75,6 +77,10 @@ class CdmLicense {
virtual bool is_offline() { return is_offline_; }
virtual const VersionInfo& GetServiceVersion() {
return latest_service_version_;
}
static bool ExtractProviderSessionToken(
const CdmKeyResponse& license_response,
std::string* provider_session_token);
@@ -152,6 +158,9 @@ class CdmLicense {
RepeatedPtrField<License_KeyContainer> entitlement_keys_;
std::string provider_client_token_;
// This is the latest version info extracted from the SignedMessage in
// HandleKeyResponse
VersionInfo latest_service_version_;
#if defined(UNIT_TEST)
friend class CdmLicenseTestPeer;

View File

@@ -68,7 +68,7 @@ class PolicyEngine {
virtual void SetLicenseForRelease(const video_widevine::License& license);
// Call this on first decrypt to set the start of playback.
virtual void BeginDecryption(void);
virtual bool BeginDecryption(void);
virtual void DecryptionEvent(void);
// UpdateLicense is used in handling a license response for a renewal request.

View File

@@ -83,6 +83,7 @@ class UsageTableHeader {
static int64_t GetRandomInRange(size_t upper_bound_exclusive);
static int64_t GetRandomInRangeWithExclusion(size_t upper_bound_exclusive,
size_t exclude);
size_t size() { return usage_entry_info_.size(); }
private:
CdmResponseType MoveEntry(uint32_t from /* usage entry number */,

View File

@@ -87,6 +87,7 @@ static const std::string QUERY_KEY_DECRYPT_HASH_SUPPORT =
static const std::string QUERY_VALUE_TRUE = "True";
static const std::string QUERY_VALUE_FALSE = "False";
static const std::string QUERY_VALUE_NONE = "None";
static const std::string QUERY_VALUE_STREAMING = "Streaming";
static const std::string QUERY_VALUE_OFFLINE = "Offline";
static const std::string QUERY_VALUE_SECURITY_LEVEL_L1 = "L1";