Update of DRM framework
- Overload openDecryptSession() with uri parameter
in order to accept URI of DRM content,
Following API is added,
DecryptHandle*openDecryptSession(const char* uri);.
- Unify texisting three event types of processDrmInfo()
so that caller of DRM framework does not have to handle many event types.
- Let DrmManagerService call load/unload plugins API so that
client of DRM framework does not have to manage plug-in load/unload.
- Trivial fix in DrmManagerClient.java is also incorporated.
Changes are made by Sony Corporation.
Change-Id: If62b47fa0360718fdc943e6e6143671d7db26adc
diff --git a/drm/libdrmframework/include/DrmManager.h b/drm/libdrmframework/include/DrmManager.h
index dc3e460..d782f5b 100644
--- a/drm/libdrmframework/include/DrmManager.h
+++ b/drm/libdrmframework/include/DrmManager.h
@@ -57,15 +57,19 @@
void removeUniqueId(int uniqueId);
- status_t loadPlugIns(int uniqueId);
+ void addClient(int uniqueId);
- status_t loadPlugIns(int uniqueId, const String8& plugInDirPath);
+ void removeClient(int uniqueId);
+
+ status_t loadPlugIns();
+
+ status_t loadPlugIns(const String8& plugInDirPath);
+
+ status_t unloadPlugIns();
status_t setDrmServiceListener(
int uniqueId, const sp<IDrmServiceListener>& drmServiceListener);
- status_t unloadPlugIns(int uniqueId);
-
status_t installDrmEngine(int uniqueId, const String8& drmEngineFile);
DrmConstraints* getConstraints(int uniqueId, const String8* path, const int action);
@@ -107,6 +111,8 @@
DecryptHandle* openDecryptSession(int uniqueId, int fd, int offset, int length);
+ DecryptHandle* openDecryptSession(int uniqueId, const char* uri);
+
status_t closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle);
status_t initializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle,
@@ -129,12 +135,8 @@
String8 getSupportedPlugInIdFromPath(int uniqueId, const String8& path);
- void populate(int uniqueId);
-
bool canHandle(int uniqueId, const String8& path);
- void initializePlugIns(int uniqueId);
-
private:
static Vector<int> mUniqueIdVector;
static const String8 EMPTY_STRING;