Merge "Allows sharing of keys between sessions" into klp-dev
This commit is contained in:
@@ -16,6 +16,9 @@ class CdmClientPropertySet {
|
||||
virtual std::string security_level() const = 0;
|
||||
virtual bool use_privacy_mode() const = 0;
|
||||
virtual std::vector<uint8_t> service_certificate() const = 0;
|
||||
virtual bool is_session_sharing_enabled() const = 0;
|
||||
virtual uint32_t session_sharing_id() const = 0;
|
||||
virtual void set_session_sharing_id(uint32_t id) = 0;
|
||||
};
|
||||
|
||||
} // namespace wvcdm
|
||||
|
||||
@@ -93,6 +93,7 @@ class CdmEngine : public TimerHandler {
|
||||
|
||||
// Is the key known to any session?
|
||||
virtual bool IsKeyValid(const KeyId& key_id);
|
||||
virtual bool FindSessionForKey(const KeyId& key_id, CdmSessionId* sessionId);
|
||||
|
||||
// Event listener related methods
|
||||
virtual bool AttachEventListener(const CdmSessionId& session_id,
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#ifndef CDM_BASE_LICENSE_H_
|
||||
#define CDM_BASE_LICENSE_H_
|
||||
|
||||
#include <set>
|
||||
|
||||
#include "wv_cdm_types.h"
|
||||
|
||||
namespace video_widevine_server {
|
||||
@@ -41,6 +43,7 @@ class CdmLicense {
|
||||
CdmKeyResponse& license_response,
|
||||
CdmKeyResponse& license_renewal_response);
|
||||
bool HasInitData() { return !init_data_.empty(); }
|
||||
bool IsKeyLoaded(const KeyId& key_id);
|
||||
|
||||
private:
|
||||
bool PrepareServiceCertificateRequest(CdmKeyMessage* signed_request,
|
||||
@@ -58,6 +61,7 @@ class CdmLicense {
|
||||
std::string service_certificate_;
|
||||
std::string init_data_;
|
||||
bool initialized_;
|
||||
std::set<KeyId> loaded_keys_;
|
||||
|
||||
// Used for certificate based licensing
|
||||
CdmKeyMessage key_request_;
|
||||
|
||||
@@ -66,6 +66,7 @@ class Properties {
|
||||
static const std::vector<uint8_t> GetServiceCertificate(
|
||||
const CdmSessionId& session_id);
|
||||
static bool UsePrivacyMode(const CdmSessionId& session_id);
|
||||
static uint32_t GetSessionSharingId(const CdmSessionId& session_id);
|
||||
|
||||
static bool AddSessionPropertySet(
|
||||
const CdmSessionId& session_id,
|
||||
|
||||
Reference in New Issue
Block a user