diff options
author | Deva Ramasubramanian <dramasub@codeaurora.org> | 2012-09-18 16:15:32 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-09-19 11:17:36 -0700 |
commit | dbaaa38882b8f13c1ff3a0ea352584cdbbbcba72 (patch) | |
tree | 203459c6bd42e356de678d0e894fbfb1a0ab4edd /include/media | |
parent | 3cdccc6f852be345c43bdfbc2466aa17c1173c9c (diff) | |
download | frameworks_native-dbaaa38882b8f13c1ff3a0ea352584cdbbbcba72.tar.gz frameworks_native-dbaaa38882b8f13c1ff3a0ea352584cdbbbcba72.tar.bz2 frameworks_native-dbaaa38882b8f13c1ff3a0ea352584cdbbbcba72.zip |
frameworks/native: Amend HDCP API
- Allow caller to set the observer and cookie.
- Add more notifications that the HDCPModule can send to its Observer.
Change-Id: I8bf9cc02a029cd38bbd25d9f0a634452173f4d26
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/hardware/HDCPAPI.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/media/hardware/HDCPAPI.h b/include/media/hardware/HDCPAPI.h index bb9154080..23e2bdda0 100644 --- a/include/media/hardware/HDCPAPI.h +++ b/include/media/hardware/HDCPAPI.h @@ -23,7 +23,7 @@ namespace android { struct HDCPModule { - typedef void (*ObserverFunc)(int msg, int ext1, int ext2); + typedef void (*ObserverFunc)(void *cookie, int msg, int ext1, int ext2); // The msg argument in calls to the observer notification function. enum { @@ -34,18 +34,26 @@ struct HDCPModule { // ext1 should be a suitable error code (status_t), ext2 is // unused. HDCP_INITIALIZATION_COMPLETE, + HDCP_INITIALIZATION_FAILED, // Sent upon completion of a call to "HDCPModule::shutdownAsync". // ext1 should be a suitable error code, ext2 is unused. HDCP_SHUTDOWN_COMPLETE, + HDCP_SHUTDOWN_FAILED, + + HDCP_UNAUTHENTICATED_CONNECTION, + HDCP_UNAUTHORIZED_CONNECTION, + HDCP_REVOKED_CONNECTION, + HDCP_TOPOLOGY_EXECEEDED, + HDCP_UNKNOWN_ERROR, }; // Module can call the notification function to signal completion/failure // of asynchronous operations (such as initialization) or out of band // events. - HDCPModule(ObserverFunc observerNotify); + HDCPModule(void *cookie, ObserverFunc observerNotify) {}; - virtual ~HDCPModule(); + virtual ~HDCPModule() {}; // Request to setup an HDCP session with the specified host listening // on the specified port. @@ -78,7 +86,8 @@ private: // "libstagefright_hdcp.so", it will be dynamically loaded into the // mediaserver process. extern "C" { - extern android::HDCPModule *createHDCPModule(); + extern android::HDCPModule *createHDCPModule( + void *cookie, android::HDCPModule::ObserverFunc); } #endif // HDCP_API_H_ |