Upgrade of Widevine libraries from 4.5.0 to 6.0.0
Upload for Dave Parsons 6.0.0 Widevine libraries contain the features required to support multiple audio tracks and subtitles. This is establishing the baseline for those features. Change-Id: If12074bb2e4364c8107339e2f69453c40698e91f related-to-bug: 5880566
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 &&
|
||||
@@ -397,14 +397,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)
|
||||
@@ -420,11 +421,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