summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-05-20 11:05:43 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-05-20 11:05:43 -0700
commit24ff7fae02f5aac80c60f72b0e001c218565a316 (patch)
tree7ae4ce1c40a7f9e996a2535fb87077b77d127bff /media
parent2300984526d5db18457999f1f24a7dfbcf46d479 (diff)
parent4d8ceada09441f43a98f5c7dadde9192e7d6abf9 (diff)
downloadframeworks_base-24ff7fae02f5aac80c60f72b0e001c218565a316.zip
frameworks_base-24ff7fae02f5aac80c60f72b0e001c218565a316.tar.gz
frameworks_base-24ff7fae02f5aac80c60f72b0e001c218565a316.tar.bz2
am 4d8ceada: am dbfd055d: am a6f1104b: Use pread() to get the decrypted data for container based DRM file. For bug 4392094.
* commit '4d8ceada09441f43a98f5c7dadde9192e7d6abf9': Use pread() to get the decrypted data for container based DRM file. For bug 4392094.
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 821ba9b..ce30fc8 100644
--- a/media/libstagefright/NuHTTPDataSource.cpp
+++ b/media/libstagefright/NuHTTPDataSource.cpp
@@ -392,6 +392,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;