Source release 14.0.0

This commit is contained in:
John W. Bruce
2018-05-16 17:35:40 -07:00
parent 31381a1311
commit 3ab70cec4e
2053 changed files with 1585838 additions and 4614 deletions

View File

@@ -13,6 +13,8 @@ namespace wvcdm {
class LicenseKeyStatus;
using video_widevine::WidevinePsshData_EntitledKey;
// Holds all content and operator session keys for a session.
class LicenseKeys {
public:
@@ -56,8 +58,11 @@ class LicenseKeys {
// Extracts the keys from a license and makes them available for
// querying usage and constraint settings.
virtual void SetFromLicense(
const video_widevine::License& license);
virtual void SetFromLicense(const video_widevine::License& license);
// Sets the keys from the input entitled key data.
virtual void SetEntitledKeys(
const std::vector<WidevinePsshData_EntitledKey>& keys);
private:
typedef ::video_widevine::License::KeyContainer KeyContainer;
@@ -67,7 +72,12 @@ class LicenseKeys {
void Clear();
bool is_initialized_;
// |keys_| can hold either content key statuses, or entitlement key statuses.
std::map<KeyId, LicenseKeyStatus*> keys_;
// |content_keyid_to_entitlement_key_id_| maps a content key id to an
// entitlement_key_id. The resulting key id can be used to obtain the current
// key status from |keys_| when using entitlement key licensing.
std::map<KeyId, KeyId> content_keyid_to_entitlement_key_id_;
CORE_DISALLOW_COPY_AND_ASSIGN(LicenseKeys);
};
@@ -101,8 +111,8 @@ class LicenseKeyStatus {
virtual bool MeetsConstraints() const { return meets_constraints_; }
// Applies the given changes in resolution or HDCP settings.
virtual void ApplyConstraints(
uint32_t new_resolution, CryptoSession::HdcpCapability new_hdcp_level);
virtual void ApplyConstraints(uint32_t new_resolution,
CryptoSession::HdcpCapability new_hdcp_level);
protected:
typedef ::video_widevine::License::KeyContainer KeyContainer;
@@ -118,13 +128,10 @@ class LicenseKeyStatus {
virtual ~LicenseKeyStatus() {}
private:
void ParseContentKey(const KeyContainer& key);
void ParseOperatorSessionKey(const KeyContainer& key);
bool HasConstraints() {
return is_content_key_ && constraints_.size() != 0;
}
bool HasConstraints() { return is_content_key_ && constraints_.size() != 0; }
void SetConstraints(const ConstraintList& constraints);