Add additional error conditions to MediaDrm
Merge of http://go/wvgerrit/70163 New codes are being added to handle resource contention, lost session state, frame size too large and insufficient security level for decryption. Also cleans up inconsistent use of tamper detected error where invalid state error should have been used. bug:111504510 bug:111505796 test: cts and gts media tests, widevine integration tests Change-Id: I96ee441717d32ccbcabaa85c8f6a0013055ce16e
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
#ifndef WV_CRYPTO_PLUGIN_H_
|
||||
#define WV_CRYPTO_PLUGIN_H_
|
||||
|
||||
#include <android/hardware/drm/1.0/ICryptoPlugin.h>
|
||||
#include <android/hidl/memory/1.0/IMemory.h>
|
||||
|
||||
#include "HidlTypes.h"
|
||||
#include "wv_content_decryption_module.h"
|
||||
#include "WVTypes.h"
|
||||
|
||||
@@ -19,20 +19,7 @@ namespace drm {
|
||||
namespace V1_2 {
|
||||
namespace widevine {
|
||||
|
||||
using ::android::hardware::drm::V1_0::DestinationBuffer;
|
||||
using ::android::hardware::drm::V1_0::ICryptoPlugin;
|
||||
using ::android::hardware::drm::V1_0::Mode;
|
||||
using ::android::hardware::drm::V1_0::Pattern;
|
||||
using ::android::hardware::drm::V1_0::SharedBuffer;
|
||||
using ::android::hardware::drm::V1_0::Status;
|
||||
using ::android::hardware::drm::V1_0::SubSample;
|
||||
using ::android::hardware::hidl_array;
|
||||
using ::android::hardware::hidl_string;
|
||||
using ::android::hardware::hidl_vec;
|
||||
using ::android::hardware::Return;
|
||||
using ::android::hardware::hidl_memory;
|
||||
using ::android::hidl::memory::V1_0::IMemory;
|
||||
using ::android::sp;
|
||||
|
||||
struct WVCryptoPlugin : public ICryptoPlugin {
|
||||
WVCryptoPlugin(const void* data, size_t size,
|
||||
@@ -62,6 +49,18 @@ struct WVCryptoPlugin : public ICryptoPlugin {
|
||||
const DestinationBuffer& destination,
|
||||
decrypt_cb _hidl_cb) override;
|
||||
|
||||
Return<void> decrypt_1_2(
|
||||
bool secure,
|
||||
const hidl_array<uint8_t, 16>& keyId,
|
||||
const hidl_array<uint8_t, 16>& iv,
|
||||
Mode mode,
|
||||
const Pattern& pattern,
|
||||
const hidl_vec<SubSample>& subSamples,
|
||||
const SharedBuffer& source,
|
||||
uint64_t offset,
|
||||
const DestinationBuffer& destination,
|
||||
decrypt_1_2_cb _hidl_cb) override;
|
||||
|
||||
private:
|
||||
WVDRM_DISALLOW_COPY_AND_ASSIGN_AND_NEW(WVCryptoPlugin);
|
||||
|
||||
@@ -70,7 +69,7 @@ struct WVCryptoPlugin : public ICryptoPlugin {
|
||||
|
||||
sp<wvcdm::WvContentDecryptionModule> const mCDM;
|
||||
|
||||
Status attemptDecrypt(
|
||||
Status_V1_2 attemptDecrypt(
|
||||
const wvcdm::CdmDecryptionParameters& params,
|
||||
bool haveEncryptedSubsamples, std::string* errorDetailMsg);
|
||||
static wvcdm::CdmResponseType countEncryptedBlocksInPatternedRange(
|
||||
|
||||
Reference in New Issue
Block a user