summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-05-20 10:15:21 -0700
committerGloria Wang <gwang@google.com>2011-05-20 10:15:21 -0700
commitfa6efe7757a41f7125fc49312230283b63618111 (patch)
treec22ca5f49e3cc6e09815ebf602138c388e1b049e /media
parent5a4e4804aa5340a4cf7ef4250d31fd901f53ddb2 (diff)
downloadframeworks_av-fa6efe7757a41f7125fc49312230283b63618111.zip
frameworks_av-fa6efe7757a41f7125fc49312230283b63618111.tar.gz
frameworks_av-fa6efe7757a41f7125fc49312230283b63618111.tar.bz2
Use pread() to get the decrypted data for container based DRM file.
For bug 4392094. Change-Id: Icc64a26c5b413313cc35dcd02d60484dc8245dfb
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/NuHTTPDataSource.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/media/libstagefright/NuHTTPDataSource.cpp b/media/libstagefright/NuHTTPDataSource.cpp
index 62fb732..dd29c84 100644
--- a/media/libstagefright/NuHTTPDataSource.cpp
+++ b/media/libstagefright/NuHTTPDataSource.cpp
@@ -383,6 +383,13 @@ ssize_t NuHTTPDataSource::readAt(off64_t offset, void *data, size_t size) {
Mutex::Autolock autoLock(mLock);
+ // if it's a DRM container based streaming, call pread() of the DRM plugin
+ // to get the decrypted data
+ if (mDecryptHandle != NULL && DecryptApiType::CONTAINER_BASED
+ == mDecryptHandle->decryptApiType) {
+ return mDrmManagerClient->pread(mDecryptHandle, data, size, offset);
+ }
+
if (offset != mOffset) {
String8 host = mHost;
String8 path = mPath;