Merge "Upgrade of Widevine libraries from 4.5.0 to 6.0.0"
This commit is contained in:
@@ -243,7 +243,7 @@ status_t WVMMediaSource::read(MediaBuffer **buffer, const ReadOptions *options)
|
||||
#endif
|
||||
|
||||
size_t bytesRead;
|
||||
bool auStart;
|
||||
bool auEnd;
|
||||
size_t offset = 0;
|
||||
int64_t keyTime;
|
||||
|
||||
@@ -259,7 +259,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, auStart, mDts, mPts, syncFrame);
|
||||
size, bytesRead, mDts, mPts, syncFrame, auEnd);
|
||||
|
||||
if (result != WV_Status_OK &&
|
||||
result != WV_Status_Warning_Need_Key &&
|
||||
@@ -399,14 +399,15 @@ status_t WVMMediaSource::read(MediaBuffer **buffer, const ReadOptions *options)
|
||||
|
||||
WVMMediaSource::DecryptContext WVMMediaSource::sDecryptContext[2] = {};
|
||||
|
||||
void WVMMediaSource::DecryptCallback(WVEsSelector esType, void* input, void* output,
|
||||
size_t length, int key)
|
||||
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)
|
||||
{
|
||||
//ALOGD("DecryptCallback(type=%d, in=%p, out=%p, len=%d, key=%d\n",
|
||||
// (int)esType, input, output, length, key);
|
||||
DecryptContext &context = sDecryptContext[esType];
|
||||
OEMCrypto_UINT32 copied = length;
|
||||
OEMCryptoResult result;
|
||||
WVStatus status;
|
||||
unsigned char *iv = NULL;
|
||||
|
||||
if (key)
|
||||
@@ -422,11 +423,17 @@ void WVMMediaSource::DecryptCallback(WVEsSelector esType, void* input, void* out
|
||||
&copied);
|
||||
}
|
||||
|
||||
if (result != OEMCrypto_SUCCESS) {
|
||||
if (result == OEMCrypto_SUCCESS) {
|
||||
status = WV_Status_OK;
|
||||
}
|
||||
else {
|
||||
status = WV_Status_Unknown;
|
||||
ALOGD("OEMCrypto decrypt failure: %d", result);
|
||||
}
|
||||
|
||||
context.mOffset += copied;
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user