summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJeff Tinker <jtinker@google.com>2012-04-26 10:38:47 -0700
committerJeff Tinker <jtinker@google.com>2012-04-26 15:46:07 -0700
commited709d00ead015b8a0de50ebc410073f6a078fd5 (patch)
treeb5a3bcd9093d55eaff2886443c985d7e8708e82a /media
parent0756aa99dffd5740d963fdda60699fdefe58ce85 (diff)
downloadframeworks_av-ed709d00ead015b8a0de50ebc410073f6a078fd5.zip
frameworks_av-ed709d00ead015b8a0de50ebc410073f6a078fd5.tar.gz
frameworks_av-ed709d00ead015b8a0de50ebc410073f6a078fd5.tar.bz2
Expose an API to run the WV extractor in crypto plugin mode.
Provides compatibility with the MediaCodec model. Change-Id: I76f2c7d1e9d2cfc3e76b531ac9b2cf66aa6a4327 related-to-bug: 5986621
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/WVMExtractor.cpp6
-rw-r--r--media/libstagefright/include/WVMExtractor.h7
2 files changed, 13 insertions, 0 deletions
diff --git a/media/libstagefright/WVMExtractor.cpp b/media/libstagefright/WVMExtractor.cpp
index effe336..08d2ae2 100644
--- a/media/libstagefright/WVMExtractor.cpp
+++ b/media/libstagefright/WVMExtractor.cpp
@@ -127,6 +127,12 @@ void WVMExtractor::setAdaptiveStreamingMode(bool adaptive) {
}
}
+void WVMExtractor::setCryptoPluginMode(bool cryptoPluginMode) {
+ if (mImpl != NULL) {
+ mImpl->setCryptoPluginMode(cryptoPluginMode);
+ }
+}
+
void WVMExtractor::setUID(uid_t uid) {
if (mImpl != NULL) {
mImpl->setUID(uid);
diff --git a/media/libstagefright/include/WVMExtractor.h b/media/libstagefright/include/WVMExtractor.h
index 3c3ca89..2b952e2 100644
--- a/media/libstagefright/include/WVMExtractor.h
+++ b/media/libstagefright/include/WVMExtractor.h
@@ -34,6 +34,7 @@ public:
virtual int64_t getCachedDurationUs(status_t *finalStatus) = 0;
virtual void setAdaptiveStreamingMode(bool adaptive) = 0;
+ virtual void setCryptoPluginMode(bool cryptoPluginMode) = 0;
virtual void setUID(uid_t uid) = 0;
};
@@ -61,6 +62,12 @@ public:
// is used.
void setAdaptiveStreamingMode(bool adaptive);
+ // setCryptoPluginMode(true) to select crypto plugin mode.
+ // In this mode, the extractor returns encrypted data for use
+ // with the MediaCodec model, which handles the decryption in the
+ // codec.
+ void setCryptoPluginMode(bool cryptoPluginMode);
+
void setUID(uid_t uid);
static bool getVendorLibHandle();