summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice
diff options
context:
space:
mode:
authorJeff Tinker <jtinker@google.com>2013-08-22 23:08:10 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-22 23:08:10 +0000
commit62c1a46eec047eb5fbc4b90432ec1ce65b76fb75 (patch)
treedce59b6f085880d667534b7190df11d1c52b6343 /media/libmediaplayerservice
parent4b820b0e1fa069714b123fc35784541d0f94d267 (diff)
parent9cf69e0fc110f17c28e988ed0f9bf91abfaf710d (diff)
downloadframeworks_av-62c1a46eec047eb5fbc4b90432ec1ce65b76fb75.zip
frameworks_av-62c1a46eec047eb5fbc4b90432ec1ce65b76fb75.tar.gz
frameworks_av-62c1a46eec047eb5fbc4b90432ec1ce65b76fb75.tar.bz2
Merge "Add ability to test supported content types to MediaDrm" into klp-dev
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r--media/libmediaplayerservice/Drm.cpp13
-rw-r--r--media/libmediaplayerservice/Drm.h2
2 files changed, 9 insertions, 6 deletions
diff --git a/media/libmediaplayerservice/Drm.cpp b/media/libmediaplayerservice/Drm.cpp
index f00f488..4b527d0 100644
--- a/media/libmediaplayerservice/Drm.cpp
+++ b/media/libmediaplayerservice/Drm.cpp
@@ -211,15 +211,18 @@ bool Drm::loadLibraryForScheme(const String8 &path, const uint8_t uuid[16]) {
return true;
}
-bool Drm::isCryptoSchemeSupported(const uint8_t uuid[16]) {
+bool Drm::isCryptoSchemeSupported(const uint8_t uuid[16], const String8 &mimeType) {
+
Mutex::Autolock autoLock(mLock);
- if (mFactory && mFactory->isCryptoSchemeSupported(uuid)) {
- return true;
+ if (!mFactory || !mFactory->isCryptoSchemeSupported(uuid)) {
+ findFactoryForScheme(uuid);
+ if (mInitCheck != OK) {
+ return false;
+ }
}
- findFactoryForScheme(uuid);
- return (mInitCheck == OK);
+ return mFactory->isContentTypeSupported(mimeType);
}
status_t Drm::createPlugin(const uint8_t uuid[16]) {
diff --git a/media/libmediaplayerservice/Drm.h b/media/libmediaplayerservice/Drm.h
index 3f460f1..119fd50 100644
--- a/media/libmediaplayerservice/Drm.h
+++ b/media/libmediaplayerservice/Drm.h
@@ -37,7 +37,7 @@ struct Drm : public BnDrm,
virtual status_t initCheck() const;
- virtual bool isCryptoSchemeSupported(const uint8_t uuid[16]);
+ virtual bool isCryptoSchemeSupported(const uint8_t uuid[16], const String8 &mimeType);
virtual status_t createPlugin(const uint8_t uuid[16]);