Widevine HLS live stream support for L1 secure playback.

Check in for Jeff Tinker.
BUG 5081725

Change-Id: If1d828e97319788ab52c6f15a7782a1da63d8f20
This commit is contained in:
Edwin Wong
2011-09-08 15:11:37 -07:00
parent 758456e6c7
commit ba14720f8e
7 changed files with 14 additions and 10 deletions

View File

@@ -82,14 +82,18 @@ void WVMMediaSource::allocBufferGroup()
status_t WVMMediaSource::setBuffers(const Vector<MediaBuffer *> &buffers) { status_t WVMMediaSource::setBuffers(const Vector<MediaBuffer *> &buffers) {
#ifdef REQUIRE_SECURE_BUFFERS #ifdef REQUIRE_SECURE_BUFFERS
LOGI("Using codec-supplied buffers"); if (!mIsLiveStream) {
LOGI("Using codec-supplied buffers");
delete mGroup; delete mGroup;
mGroup = new MediaBufferGroup; mGroup = new MediaBufferGroup;
for (size_t i = 0; i < buffers.size(); ++i) { for (size_t i = 0; i < buffers.size(); ++i) {
mGroup->add_buffer(buffers.itemAt(i)); mGroup->add_buffer(buffers.itemAt(i));
}
return OK;
} else {
return ERROR_UNSUPPORTED;
} }
return OK;
#else #else
return ERROR_UNSUPPORTED; return ERROR_UNSUPPORTED;
#endif #endif
@@ -118,11 +122,11 @@ status_t WVMMediaSource::start(MetaData *)
} }
#ifndef REQUIRE_SECURE_BUFFERS #ifndef REQUIRE_SECURE_BUFFERS
allocBufferGroup(); allocBufferGroup();
#endif #endif
} else { } else {
// audio // audio
allocBufferGroup(); allocBufferGroup();
} }
return OK; return OK;
@@ -160,7 +164,7 @@ sp<MetaData> WVMMediaSource::getFormat()
Mutex::Autolock autoLock(mLock); Mutex::Autolock autoLock(mLock);
#ifdef REQUIRE_SECURE_BUFFERS #ifdef REQUIRE_SECURE_BUFFERS
if (mESSelector == WV_EsSelector_Video) { if (!mIsLiveStream && (mESSelector == WV_EsSelector_Video)) {
mTrackMetaData->setInt32(kKeyRequiresSecureBuffers, true); mTrackMetaData->setInt32(kKeyRequiresSecureBuffers, true);
} }
#endif #endif