Source release 16.4.0

This commit is contained in:
John W. Bruce
2020-10-09 16:08:56 -07:00
parent 160df9f57a
commit 9d17a531ee
562 changed files with 52913 additions and 37426 deletions

View File

@@ -56,10 +56,13 @@ class PolicyEngine {
// SetLicense is used in handling the initial license response. It stores
// an exact copy of the policy information stored in the license.
// The license state transitions to kLicenseStateCanPlay if the license
// permits playback.
// License state transitions and notifications may occur if
// |defer_license_state_update| is not set. If set, the license is likely
// being restored and transitions and notifications will be deferred until
// stored playback times are restored.
virtual void SetLicense(const video_widevine::License& license,
bool supports_core_messages);
bool supports_core_messages,
bool defer_license_state_update);
// Used to update the currently loaded entitled content keys.
virtual void SetEntitledLicenseKeys(
@@ -78,9 +81,17 @@ class PolicyEngine {
// UpdateLicense is used in handling a license response for a renewal request.
// The response may only contain any policy fields that have changed. In this
// case an exact copy is not what we want to happen. We also will receive an
// updated license_start_time from the server. The license will transition to
// kLicenseStateCanPlay if the license permits playback.
virtual void UpdateLicense(const video_widevine::License& license);
// updated license_start_time from the server.
// License state transitions and notifications may occur if
// |defer_license_state_update| is not set. If set, the license is likely
// being restored and transitions and notifications will be deferred until
// stored playback times are restored.
virtual void UpdateLicense(const video_widevine::License& license,
bool defer_license_state_update);
// This method updates license state and sends appropriate notifications
// to event listeners.
virtual void UpdateLicenseState(int64_t current_time);
// Used for notifying the Policy Engine of resolution changes
virtual void NotifyResolution(uint32_t width, uint32_t height);
@@ -101,6 +112,9 @@ class PolicyEngine {
int64_t GetPlaybackStartTime();
int64_t GetLastPlaybackTime();
int64_t GetGracePeriodEndTime();
// This method will also update license state and sends appropriate
// notifications to event listeners.
void RestorePlaybackTimes(int64_t playback_start_time,
int64_t last_playback_time,
int64_t grace_period_end_time);
@@ -153,6 +167,7 @@ class PolicyEngine {
void SetSecurityLevelForTest(CdmSecurityLevel security_level);
LicenseState license_state_;
int64_t license_state_update_deadline_;
// This is the license id field from server response. This data gets passed
// back to the server in each renewal request. When we get a renewal response