Revert Widevine 6.0.0 -> 4.5.0 libraries
DO NOT MERGE Source and library changes to roll back to 4.5.0, including maintaining the DRM HAL support. Includes Widevine libraries 4.5.0-7111 Change-Id: I420c6990748e95ad7516ecb2397ebf7707a157f4 related-to-bug: 6492434
This commit is contained in:
committed by
The Android Automerger
parent
421eb34b21
commit
920e511f16
@@ -370,7 +370,7 @@ status_t WVMExtractorImpl::readESDSMetaData(sp<MetaData> audioMetaData)
|
||||
int limit = 500;
|
||||
do {
|
||||
size_t bytesRead;
|
||||
bool auEnd, sync;
|
||||
bool auStart, sync;
|
||||
unsigned long long dts, pts;
|
||||
unsigned char buf[1];
|
||||
size_t bufSize = 0;
|
||||
@@ -380,7 +380,7 @@ status_t WVMExtractorImpl::readESDSMetaData(sp<MetaData> audioMetaData)
|
||||
// pull some audio data. But we can't use it yet, so just request 0 bytes.
|
||||
//
|
||||
(void)WV_GetEsData(mSession, WV_EsSelector_Audio, buf, bufSize,
|
||||
bytesRead, dts, pts, sync, auEnd);
|
||||
bytesRead, auStart, dts, pts, sync);
|
||||
|
||||
result = WV_Info_GetCodecConfig(mSession, WV_CodecConfigType_ESDS, config, size);
|
||||
if (result != WV_Status_OK)
|
||||
|
||||
@@ -253,7 +253,7 @@ status_t WVMMediaSource::read(MediaBuffer **buffer, const ReadOptions *options)
|
||||
#endif
|
||||
|
||||
size_t bytesRead;
|
||||
bool auEnd;
|
||||
bool auStart;
|
||||
size_t offset = 0;
|
||||
int64_t keyTime;
|
||||
|
||||
@@ -269,7 +269,7 @@ status_t WVMMediaSource::read(MediaBuffer **buffer, const ReadOptions *options)
|
||||
size_t size = mediaBuf->size() - offset;
|
||||
|
||||
WVStatus result = WV_GetEsData(mSession, mESSelector, (uint8_t *)mediaBuf->data() + offset,
|
||||
size, bytesRead, mDts, mPts, syncFrame, auEnd);
|
||||
size, bytesRead, auStart, mDts, mPts, syncFrame);
|
||||
|
||||
if (result != WV_Status_OK &&
|
||||
result != WV_Status_Warning_Need_Key &&
|
||||
@@ -416,9 +416,8 @@ status_t WVMMediaSource::read(MediaBuffer **buffer, const ReadOptions *options)
|
||||
|
||||
#ifdef REQUIRE_SECURE_BUFFERS
|
||||
|
||||
WVStatus WVMMediaSource::DecryptCallback(WVEsSelector esType, void* input, void* output, size_t length,
|
||||
int key, unsigned long long dts, unsigned long long pts, bool au_end,
|
||||
void *obj)
|
||||
void WVMMediaSource::DecryptCallback(WVEsSelector esType, void* input, void* output,
|
||||
size_t length, int key, void *obj)
|
||||
{
|
||||
//ALOGD("DecryptCallback(type=%d, in=%p, out=%p, len=%d, key=%d\n",
|
||||
// (int)esType, input, output, length, key);
|
||||
@@ -426,7 +425,7 @@ WVStatus WVMMediaSource::DecryptCallback(WVEsSelector esType, void* input, void*
|
||||
WVMExtractorImpl *extractor = (WVMExtractorImpl *)obj;
|
||||
if (!extractor) {
|
||||
ALOGE("WVMMediaSource::DecryptCallback - no extractor!");
|
||||
return WV_Status_Unknown;
|
||||
return;
|
||||
}
|
||||
|
||||
sp<WVMMediaSource> source;
|
||||
@@ -438,7 +437,6 @@ WVStatus WVMMediaSource::DecryptCallback(WVEsSelector esType, void* input, void*
|
||||
|
||||
OEMCrypto_UINT32 copied = length;
|
||||
OEMCryptoResult result;
|
||||
WVStatus status = WV_Status_OK;
|
||||
unsigned char *iv = NULL;
|
||||
|
||||
if (extractor->getCryptoPluginMode()) {
|
||||
@@ -462,16 +460,11 @@ WVStatus WVMMediaSource::DecryptCallback(WVEsSelector esType, void* input, void*
|
||||
&copied);
|
||||
}
|
||||
|
||||
if (result == OEMCrypto_SUCCESS) {
|
||||
status = WV_Status_OK;
|
||||
} else {
|
||||
status = WV_Status_Unknown;
|
||||
if (result != OEMCrypto_SUCCESS) {
|
||||
ALOGD("OEMCrypto decrypt failure: %d", result);
|
||||
}
|
||||
}
|
||||
context.mOffset += copied;
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -56,9 +56,8 @@ public:
|
||||
unsigned char mIV[kCryptoBlockSize];
|
||||
};
|
||||
|
||||
static WVStatus DecryptCallback(WVEsSelector esType, void* input, void* output, size_t length,
|
||||
int key, unsigned long long dts, unsigned long long pts,
|
||||
bool au_end, void *context);
|
||||
static void DecryptCallback(WVEsSelector esType, void* input, void* output, size_t length,
|
||||
int key, void *context);
|
||||
DecryptContext& getDecryptContext() { return mDecryptContext; }
|
||||
private:
|
||||
DecryptContext mDecryptContext;
|
||||
|
||||
Reference in New Issue
Block a user