Changes for calling the level 1 decrypt callout

Change-Id: Iccf76b59a64491952ee11ee2ed1a0e707a529f88
This commit is contained in:
Jeffrey Tinker
2011-08-30 17:59:53 -07:00
parent ceac204c61
commit f5fa8f2017
6 changed files with 145 additions and 3 deletions

View File

@@ -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();