Merge "frameworks/native: Amend HDCP API" into jb-mr1-dev

This commit is contained in:
Andreas Huber 2012-09-20 09:29:41 -07:00 committed by Android (Google) Code Review
commit 67b9de12e1
1 changed files with 13 additions and 4 deletions

View File

@ -23,7 +23,7 @@
namespace android { namespace android {
struct HDCPModule { 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. // The msg argument in calls to the observer notification function.
enum { enum {
@ -34,18 +34,26 @@ struct HDCPModule {
// ext1 should be a suitable error code (status_t), ext2 is // ext1 should be a suitable error code (status_t), ext2 is
// unused. // unused.
HDCP_INITIALIZATION_COMPLETE, HDCP_INITIALIZATION_COMPLETE,
HDCP_INITIALIZATION_FAILED,
// Sent upon completion of a call to "HDCPModule::shutdownAsync". // Sent upon completion of a call to "HDCPModule::shutdownAsync".
// ext1 should be a suitable error code, ext2 is unused. // ext1 should be a suitable error code, ext2 is unused.
HDCP_SHUTDOWN_COMPLETE, 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 // Module can call the notification function to signal completion/failure
// of asynchronous operations (such as initialization) or out of band // of asynchronous operations (such as initialization) or out of band
// events. // events.
HDCPModule(ObserverFunc observerNotify); HDCPModule(void *cookie, ObserverFunc observerNotify) {};
virtual ~HDCPModule(); virtual ~HDCPModule() {};
// Request to setup an HDCP session with the specified host listening // Request to setup an HDCP session with the specified host listening
// on the specified port. // on the specified port.
@ -78,7 +86,8 @@ private:
// "libstagefright_hdcp.so", it will be dynamically loaded into the // "libstagefright_hdcp.so", it will be dynamically loaded into the
// mediaserver process. // mediaserver process.
extern "C" { extern "C" {
extern android::HDCPModule *createHDCPModule(); extern android::HDCPModule *createHDCPModule(
void *cookie, android::HDCPModule::ObserverFunc);
} }
#endif // HDCP_API_H_ #endif // HDCP_API_H_