summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-05-20 11:02:31 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-05-20 11:02:31 -0700
commitcb83fae8b1f07cb0c8fe9433ae00b56ce7c6a6e3 (patch)
tree183edf60aa194d4341cadb6838ec058c20b19d48 /media
parente9ca6fe963ae271f38eb01a5d2246ff4fbb9afdc (diff)
parentff2e0968976f26612b34f7a88e6e1e4ed1cd277b (diff)
downloadframeworks_av-cb83fae8b1f07cb0c8fe9433ae00b56ce7c6a6e3.zip
frameworks_av-cb83fae8b1f07cb0c8fe9433ae00b56ce7c6a6e3.tar.gz
frameworks_av-cb83fae8b1f07cb0c8fe9433ae00b56ce7c6a6e3.tar.bz2
am dbfd055d: am a6f1104b: Use pread() to get the decrypted data for container based DRM file. For bug 4392094.
* commit 'dbfd055d51b51b7a6f412155c2391666efbb638a': 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 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;