summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Gloria Wang <gwang@google.com> 2011-05-20 10:57:51 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2011-05-20 10:57:51 -0700
commitdbfd055d51b51b7a6f412155c2391666efbb638a (patch)
treee0cb04fbfa58ab3e3cfd72db6042d23043f79721
parentd9435bcecc820c8715d8b6b920fd43042418a1e9 (diff)
parenta6f1104b9d829c636b60b9387e379f9667b5df09 (diff)
am a6f1104b: Use pread() to get the decrypted data for container based DRM file. For bug 4392094.
* commit 'a6f1104b9d829c636b60b9387e379f9667b5df09': Use pread() to get the decrypted data for container based DRM file. For bug 4392094.
-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 62fb73256987..dd29c8485d7e 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;