Widevine CENC drm engine update: enable decryption
This import syncs to the widevine git repostiory change commit ab3e1e43642cf36900f55169597a33f222709fdb Change-Id: I3a6f1e2969e5fe7ed1ca12f90b0eb0a3b7899835
This commit is contained in:
@@ -9,16 +9,13 @@
|
||||
#include <map>
|
||||
|
||||
#include "crypto_key.h"
|
||||
#include "OEMCryptoCENC.h"
|
||||
#include "wv_cdm_types.h"
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
typedef std::map<CryptoKeyId,CryptoKey*> CryptoKeyMap;
|
||||
|
||||
// TODO(gmorgan): fill out input and output descriptors
|
||||
typedef void* InputDescriptor;
|
||||
typedef void* OutputDescriptor;
|
||||
|
||||
class CryptoSession {
|
||||
public:
|
||||
CryptoSession();
|
||||
@@ -55,12 +52,13 @@ class CryptoSession {
|
||||
|
||||
// Media data path
|
||||
bool SelectKey(const std::string& key_id);
|
||||
bool Decrypt(const InputDescriptor input, OutputDescriptor output);
|
||||
bool Decrypt(const uint8_t* encrypted_buffer,
|
||||
size_t encrypted_size,
|
||||
size_t block_offset,
|
||||
const std::vector<uint8_t>& iv,
|
||||
uint8_t* decrypted_buffer);
|
||||
CdmResponseType Decrypt(bool is_encrypted,
|
||||
const uint8_t* encrypt_buffer,
|
||||
size_t encrypt_length,
|
||||
const std::vector<uint8_t>& iv,
|
||||
size_t block_offset,
|
||||
void* decrypt_buffer,
|
||||
bool is_video);
|
||||
|
||||
private:
|
||||
|
||||
@@ -69,6 +67,7 @@ class CryptoSession {
|
||||
void GenerateEncryptContext(const std::string& input_context,
|
||||
std::string* deriv_context);
|
||||
size_t GetOffset(std::string message, std::string field);
|
||||
bool SetDestinationBufferType();
|
||||
|
||||
bool valid_;
|
||||
bool open_;
|
||||
@@ -76,6 +75,9 @@ class CryptoSession {
|
||||
CryptoSessionId oec_session_id_;
|
||||
CryptoResult session_status_;
|
||||
|
||||
OEMCryptoBufferType destination_buffer_type_;
|
||||
bool is_destination_buffer_type_valid_;
|
||||
|
||||
CryptoKeyMap keys_;
|
||||
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(CryptoSession);
|
||||
|
||||
Reference in New Issue
Block a user