resolved conflicts for merge of 98c35aa4 to master

Change-Id: I32de004b575729f9b1852517ad5df71395e0ae69
This commit is contained in:
Jeff Tinker
2012-05-18 05:17:44 -07:00
5 changed files with 89 additions and 43 deletions

View File

@@ -8,6 +8,7 @@
#include "WVMMediaSource.h"
#include "WVMFileSource.h"
#include "WVMExtractorImpl.h"
#include "ClientContext.h"
#include "media/stagefright/foundation/ADebug.h"
#include "media/stagefright/MediaErrors.h"
#include "media/stagefright/MediaDefs.h"
@@ -66,6 +67,11 @@ void WVMMediaSource::delegateDataSource(sp<DataSource> dataSource)
mDataSource = dataSource;
}
void WVMMediaSource::delegateClientContext(sp<ClientContext> context)
{
mClientContext = context;
}
void WVMMediaSource::allocBufferGroup()
{
if (mGroup)
@@ -423,17 +429,18 @@ WVStatus WVMMediaSource::DecryptCallback(WVEsSelector esType, void* input, void*
//ALOGD("DecryptCallback(type=%d, in=%p, out=%p, len=%d, key=%d\n",
// (int)esType, input, output, length, key);
WVMExtractorImpl *extractor = (WVMExtractorImpl *)obj;
if (!extractor) {
ALOGE("WVMMediaSource::DecryptCallback - no extractor!");
ClientContext *clientContext = (ClientContext *)obj;
if (!clientContext) {
ALOGE("WVMMediaSource::DecryptCallback - no client context!");
return WV_Status_Unknown;
}
sp<WVMMediaSource> source;
if (esType == WV_EsSelector_Video)
source = extractor->getVideoSource();
source = clientContext->getVideoSource();
else
source = extractor->getAudioSource();
source = clientContext->getAudioSource();
DecryptContext &context = source->getDecryptContext();
OEMCrypto_UINT32 copied = length;
@@ -441,7 +448,7 @@ WVStatus WVMMediaSource::DecryptCallback(WVEsSelector esType, void* input, void*
WVStatus status = WV_Status_OK;
unsigned char *iv = NULL;
if (extractor->getCryptoPluginMode()) {
if (clientContext->getCryptoPluginMode()) {
// just determine crypto unit boundaries
if (key) {
source->addEncryptedSize(length);