From a6a88d9c445e261972c2433254e0a996336e78a4 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Wed, 30 Jan 2013 10:41:25 -0800 Subject: Plumbing to reflect minor changes in the HDCP module API that allow for support of _decryption_ modules in addition to what we already supported. Change-Id: Ic37b87dc170ba8def3817991d25df798f21e950b --- include/media/IHDCP.h | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'include/media/IHDCP.h') diff --git a/include/media/IHDCP.h b/include/media/IHDCP.h index a0613c7..6d27b18 100644 --- a/include/media/IHDCP.h +++ b/include/media/IHDCP.h @@ -45,18 +45,34 @@ struct IHDCP : public IInterface { // Request to shutdown the active HDCP session. virtual status_t shutdownAsync() = 0; - // Encrypt a data according to the HDCP spec. The data is to be - // encrypted in-place, only size bytes of data should be read/write, - // even if the size is not a multiple of 128 bit (16 bytes). + // ENCRYPTION only: + // Encrypt data according to the HDCP spec. "size" bytes of data are + // available at "inData" (virtual address), "size" may not be a multiple + // of 128 bits (16 bytes). An equal number of encrypted bytes should be + // written to the buffer at "outData" (virtual address). // This operation is to be synchronous, i.e. this call does not return // until outData contains size bytes of encrypted data. // streamCTR will be assigned by the caller (to 0 for the first PES stream, // 1 for the second and so on) - // inputCTR will be maintained by the callee for each PES stream. + // inputCTR _will_be_maintained_by_the_callee_ for each PES stream. virtual status_t encrypt( const void *inData, size_t size, uint32_t streamCTR, uint64_t *outInputCTR, void *outData) = 0; + // DECRYPTION only: + // Decrypt data according to the HDCP spec. + // "size" bytes of encrypted data are available at "inData" + // (virtual address), "size" may not be a multiple of 128 bits (16 bytes). + // An equal number of decrypted bytes should be written to the buffer + // at "outData" (virtual address). + // This operation is to be synchronous, i.e. this call does not return + // until outData contains size bytes of decrypted data. + // Both streamCTR and inputCTR will be provided by the caller. + virtual status_t decrypt( + const void *inData, size_t size, + uint32_t streamCTR, uint64_t inputCTR, + void *outData) = 0; + private: DISALLOW_EVIL_CONSTRUCTORS(IHDCP); }; -- cgit v1.1