summaryrefslogtreecommitdiffstats
path: root/include/media/IHDCP.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2013-01-30 10:41:25 -0800
committerAndreas Huber <andih@google.com>2013-01-30 10:41:25 -0800
commita6a88d9c445e261972c2433254e0a996336e78a4 (patch)
tree3bcb34c468d9f0f525fb68dbb237e5b709a03465 /include/media/IHDCP.h
parent1bd947a7c99853ad4ee67d59db89524be1e5acfc (diff)
downloadframeworks_av-a6a88d9c445e261972c2433254e0a996336e78a4.zip
frameworks_av-a6a88d9c445e261972c2433254e0a996336e78a4.tar.gz
frameworks_av-a6a88d9c445e261972c2433254e0a996336e78a4.tar.bz2
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
Diffstat (limited to 'include/media/IHDCP.h')
-rw-r--r--include/media/IHDCP.h24
1 files changed, 20 insertions, 4 deletions
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);
};