Source release v2.1.3-2-789 + third_party libs
Change-Id: I8648756dab3fe1f53d6da18b83cd1294581d1abe
This commit is contained in:
@@ -28,7 +28,7 @@ class WVClientPropertySet : public wvcdm::CdmClientPropertySet {
|
||||
security_level_ = securityLevel;
|
||||
}
|
||||
|
||||
virtual std::string security_level() const {
|
||||
virtual const std::string& security_level() const {
|
||||
return security_level_;
|
||||
}
|
||||
|
||||
@@ -40,11 +40,11 @@ class WVClientPropertySet : public wvcdm::CdmClientPropertySet {
|
||||
return use_privacy_mode_;
|
||||
}
|
||||
|
||||
void set_service_certificate(const std::vector<uint8_t>& serviceCertificate) {
|
||||
void set_service_certificate(const std::string& serviceCertificate) {
|
||||
service_certificate_ = serviceCertificate;
|
||||
}
|
||||
|
||||
virtual std::vector<uint8_t> service_certificate() const {
|
||||
virtual const std::string& service_certificate() const {
|
||||
return service_certificate_;
|
||||
}
|
||||
|
||||
@@ -67,24 +67,23 @@ class WVClientPropertySet : public wvcdm::CdmClientPropertySet {
|
||||
return; // This is unused by common cdm but we need a
|
||||
// definition for the pure virtual methods.
|
||||
}
|
||||
|
||||
private:
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(WVClientPropertySet);
|
||||
|
||||
std::string security_level_;
|
||||
bool use_privacy_mode_;
|
||||
std::vector<uint8_t> service_certificate_;
|
||||
std::string service_certificate_;
|
||||
};
|
||||
|
||||
class WvContentDecryptionModule : public cdm::ContentDecryptionModule,
|
||||
public IFileFactory,
|
||||
public IClock {
|
||||
File::Impl* NewFileImpl() { return new File::Impl(host_); }
|
||||
public:
|
||||
explicit WvContentDecryptionModule(cdm::Host* host)
|
||||
: host_(host), host_event_listener_(host, &cdm_engine_) {
|
||||
HostClock::SetClockInterface(this);
|
||||
}
|
||||
explicit WvContentDecryptionModule(cdm::Host* host);
|
||||
|
||||
virtual ~WvContentDecryptionModule();
|
||||
|
||||
// cdm::ContentDecryptionModule implementation.
|
||||
virtual cdm::Status GenerateKeyRequest(const char* type, int type_size,
|
||||
const uint8_t* init_data,
|
||||
@@ -94,6 +93,8 @@ class WvContentDecryptionModule : public cdm::ContentDecryptionModule,
|
||||
const uint8_t* key, int key_size,
|
||||
const uint8_t* key_id, int key_id_size) OVERRIDE;
|
||||
|
||||
virtual bool IsKeyValid(const uint8_t* key_id, int key_id_size) OVERRIDE;
|
||||
|
||||
virtual cdm::Status CancelKeyRequest(const char* session_id,
|
||||
int session_id_size) OVERRIDE;
|
||||
|
||||
@@ -102,24 +103,6 @@ class WvContentDecryptionModule : public cdm::ContentDecryptionModule,
|
||||
virtual cdm::Status Decrypt(const cdm::InputBuffer& encrypted_buffer,
|
||||
cdm::DecryptedBlock* decrypted_buffer) OVERRIDE;
|
||||
|
||||
virtual cdm::Status InitializeAudioDecoder(
|
||||
const cdm::AudioDecoderConfig& audio_decoder_config) OVERRIDE;
|
||||
|
||||
virtual cdm::Status InitializeVideoDecoder(
|
||||
const cdm::VideoDecoderConfig& video_decoder_config) OVERRIDE;
|
||||
|
||||
virtual void DeinitializeDecoder(cdm::StreamType decoder_type) OVERRIDE;
|
||||
|
||||
virtual void ResetDecoder(cdm::StreamType decoder_type) OVERRIDE;
|
||||
|
||||
virtual cdm::Status DecryptAndDecodeFrame(
|
||||
const cdm::InputBuffer& encrypted_buffer,
|
||||
cdm::VideoFrame* video_frame) OVERRIDE;
|
||||
|
||||
virtual cdm::Status DecryptAndDecodeSamples(
|
||||
const cdm::InputBuffer& encrypted_buffer,
|
||||
cdm::AudioFrames* audio_frames) OVERRIDE;
|
||||
|
||||
virtual cdm::Status DecryptDecodeAndRenderFrame(
|
||||
const cdm::InputBuffer& encrypted_buffer) OVERRIDE;
|
||||
|
||||
@@ -128,29 +111,30 @@ class WvContentDecryptionModule : public cdm::ContentDecryptionModule,
|
||||
|
||||
virtual void Destroy() OVERRIDE;
|
||||
|
||||
// Provisioning related methods
|
||||
virtual cdm::Status GetProvisioningRequest(
|
||||
std::string* request, std::string* default_url);
|
||||
std::string* request, std::string* default_url) OVERRIDE;
|
||||
|
||||
virtual cdm::Status HandleProvisioningResponse(
|
||||
std::string& response);
|
||||
|
||||
void EnablePolicyTimer();
|
||||
void DisablePolicyTimer();
|
||||
void OnTimerEvent();
|
||||
std::string& response) OVERRIDE;
|
||||
|
||||
private:
|
||||
virtual int64_t GetCurrentTimeInSeconds() {
|
||||
return host_->GetCurrentWallTimeInSeconds();
|
||||
}
|
||||
void EnablePolicyTimer();
|
||||
void DisablePolicyTimer();
|
||||
|
||||
virtual File::Impl* NewFileImpl() OVERRIDE;
|
||||
|
||||
virtual int64_t GetCurrentTimeInSeconds() OVERRIDE;
|
||||
|
||||
cdm::Status DoSubsampleDecrypt(CdmDecryptionParameters& parameters,
|
||||
std::vector<uint8_t>& iv,
|
||||
const cdm::InputBuffer& encrypted_buffer,
|
||||
cdm::DecryptedBlock* decrypted_block);
|
||||
|
||||
CdmEngine cdm_engine_;
|
||||
cdm::Host* const host_;
|
||||
HostEventListener host_event_listener_;
|
||||
WVClientPropertySet property_set_;
|
||||
bool timer_enabled_;
|
||||
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(WvContentDecryptionModule);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user