Changes for calling the level 1 decrypt callout
Change-Id: Iccf76b59a64491952ee11ee2ed1a0e707a529f88
This commit is contained in:
@@ -114,8 +114,25 @@ void WVMExtractorImpl::Initialize()
|
||||
{
|
||||
//LOGD("WVMExtractorImpl::Initialize(%d)\n", getAdaptiveStreamingMode());
|
||||
WVCredentials credentials;
|
||||
WVStatus result;
|
||||
|
||||
if (mDataSource->getUri().size() > 0 && getAdaptiveStreamingMode()) {
|
||||
mIsLiveStream = (mDataSource->getUri().getPathExtension().find(".m3u8") == 0);
|
||||
}
|
||||
|
||||
#ifdef REQUIRE_SECURE_BUFFERS
|
||||
if (!mIsLiveStream) {
|
||||
LOGD("Not live, using decrypt callback");
|
||||
WVCallbacks callbacks = {NULL, NULL, NULL, NULL, NULL, NULL, WVMMediaSource::DecryptCallback};
|
||||
result = WV_Initialize(&callbacks);
|
||||
} else {
|
||||
LOGD("Live, NOT using decrypt callback");
|
||||
result = WV_Initialize(NULL);
|
||||
}
|
||||
#else
|
||||
result = WV_Initialize(NULL);
|
||||
#endif
|
||||
|
||||
WVStatus result = WV_Initialize(NULL);
|
||||
if (result != WV_Status_OK) {
|
||||
LOGE("WV_Initialize returned status %d\n", result);
|
||||
mSetupStatus = ERROR_IO;
|
||||
@@ -128,8 +145,6 @@ void WVMExtractorImpl::Initialize()
|
||||
result = WV_Setup(mSession, mDataSource->getUri().string(),
|
||||
"RAW/RAW/RAW;destination=getdata", credentials,
|
||||
WV_OutputFormat_ES, kStreamCacheSize);
|
||||
|
||||
mIsLiveStream = (mDataSource->getUri().getPathExtension().find(".m3u8") == 0);
|
||||
} else {
|
||||
// No URI supplied or not adaptive, pull data from the stagefright data source.
|
||||
mFileSource = new WVMFileSource(mDataSource);
|
||||
|
||||
Reference in New Issue
Block a user