Changes for calling the level 1 decrypt callout
Change-Id: Iccf76b59a64491952ee11ee2ed1a0e707a529f88
This commit is contained in:
@@ -24,6 +24,9 @@
|
||||
#include <media/stagefright/MetaData.h>
|
||||
#include <media/stagefright/MediaBufferGroup.h>
|
||||
#include <utils/RefBase.h>
|
||||
#ifdef REQUIRE_SECURE_BUFFERS
|
||||
#include "OEMCrypto_L1.h"
|
||||
#endif
|
||||
|
||||
|
||||
namespace android {
|
||||
@@ -48,6 +51,24 @@ public:
|
||||
|
||||
static int sLastError;
|
||||
|
||||
#ifdef REQUIRE_SECURE_BUFFERS
|
||||
class DecryptContext {
|
||||
public:
|
||||
void Initialize(MediaBuffer *mediaBuf) {
|
||||
mMediaBuf = mediaBuf;
|
||||
mOffset = 0;
|
||||
memset(mIV, 0, sizeof(mIV));
|
||||
}
|
||||
MediaBuffer *mMediaBuf;
|
||||
size_t mOffset;
|
||||
static const int kCryptoBlockSize = 16;
|
||||
unsigned char mIV[kCryptoBlockSize];
|
||||
};
|
||||
static void DecryptCallback(WVEsSelector esType, void* input, void* output,
|
||||
size_t length, int key);
|
||||
static DecryptContext sDecryptContext[2]; // audio vs. video
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual ~WVMMediaSource();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user