Source release 14.0.0
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
namespace wvcdm {
|
||||
|
||||
using video_widevine::LicenseIdentification;
|
||||
using video_widevine::WidevinePsshData_EntitledKey;
|
||||
|
||||
class Clock;
|
||||
class CryptoSession;
|
||||
@@ -39,6 +40,10 @@ class PolicyEngine {
|
||||
// out why a key is not usable.
|
||||
virtual CdmKeyStatus GetKeyStatus(const KeyId& key_id);
|
||||
|
||||
// Verifies whether the policy allows use of the specified key of
|
||||
// a given security level for content decryption.
|
||||
virtual bool CanUseKey(const KeyId& key_id, CdmSecurityLevel security_level);
|
||||
|
||||
// OnTimerEvent is called when a timer fires. It notifies the Policy Engine
|
||||
// that the timer has fired and dispatches the relevant events through
|
||||
// |event_listener_|.
|
||||
@@ -50,12 +55,18 @@ class PolicyEngine {
|
||||
// permits playback.
|
||||
virtual void SetLicense(const video_widevine::License& license);
|
||||
|
||||
// TODO(jfore): Sublicense uses this to update the keys when they are
|
||||
// changed during key rotation. Drop this method and use SetLicenseKeys
|
||||
// instead.
|
||||
virtual void UpdateLicenseKeys(const video_widevine::License& license);
|
||||
|
||||
// Used to update the currently loaded entitled content keys.
|
||||
virtual void SetEntitledLicenseKeys(
|
||||
const std::vector<WidevinePsshData_EntitledKey>& entitled_keys);
|
||||
|
||||
// SetLicenseForRelease is used when releasing a license. The keys in this
|
||||
// license will be ignored, and any old keys will be expired.
|
||||
virtual void SetLicenseForRelease(
|
||||
const video_widevine::License& license);
|
||||
virtual void SetLicenseForRelease(const video_widevine::License& license);
|
||||
|
||||
// Call this on first decrypt to set the start of playback.
|
||||
virtual void BeginDecryption(void);
|
||||
@@ -66,8 +77,7 @@ class PolicyEngine {
|
||||
// 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);
|
||||
virtual void UpdateLicense(const video_widevine::License& license);
|
||||
|
||||
// Used for notifying the Policy Engine of resolution changes
|
||||
virtual void NotifyResolution(uint32_t width, uint32_t height);
|
||||
@@ -94,8 +104,7 @@ class PolicyEngine {
|
||||
|
||||
bool IsLicenseForFuture() { return license_state_ == kLicenseStatePending; }
|
||||
bool HasPlaybackStarted(int64_t current_time) {
|
||||
if (playback_start_time_ == 0)
|
||||
return false;
|
||||
if (playback_start_time_ == 0) return false;
|
||||
|
||||
const int64_t playback_time = current_time - playback_start_time_;
|
||||
return playback_time >= policy_.play_start_grace_period_seconds();
|
||||
@@ -211,6 +220,6 @@ class PolicyEngine {
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(PolicyEngine);
|
||||
};
|
||||
|
||||
} // wvcdm
|
||||
} // namespace wvcdm
|
||||
|
||||
#endif // WVCDM_CORE_POLICY_ENGINE_H_
|
||||
|
||||
Reference in New Issue
Block a user