summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/HDCP.cpp
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2013-05-03 21:54:17 -0700
committerChong Zhang <chz@google.com>2013-05-17 16:18:28 -0700
commit308bcaa44e578279e61be32b572fdb0b11b1e4c7 (patch)
tree3b76d5e38e37ca9f59c689bfb6aef11a75a35249 /media/libmediaplayerservice/HDCP.cpp
parent6d101328e34557fa251b7d52d4d8dbf59620d099 (diff)
downloadframeworks_av-308bcaa44e578279e61be32b572fdb0b11b1e4c7.zip
frameworks_av-308bcaa44e578279e61be32b572fdb0b11b1e4c7.tar.gz
frameworks_av-308bcaa44e578279e61be32b572fdb0b11b1e4c7.tar.bz2
wifi-display: add support for metadata mode on encoder output
pass buffer_handle_t from encoder output to HDCP encryptor input Bug: 8968123 Change-Id: Iea8007ce568641e213fd2e3cf6947a6f7a95746c
Diffstat (limited to 'media/libmediaplayerservice/HDCP.cpp')
-rw-r--r--media/libmediaplayerservice/HDCP.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/HDCP.cpp b/media/libmediaplayerservice/HDCP.cpp
index 469a02e..8a3188c 100644
--- a/media/libmediaplayerservice/HDCP.cpp
+++ b/media/libmediaplayerservice/HDCP.cpp
@@ -116,6 +116,24 @@ status_t HDCP::encrypt(
return mHDCPModule->encrypt(inData, size, streamCTR, outInputCTR, outData);
}
+status_t HDCP::encryptNative(
+ const sp<GraphicBuffer> &graphicBuffer,
+ size_t offset, size_t size, uint32_t streamCTR,
+ uint64_t *outInputCTR, void *outData) {
+ Mutex::Autolock autoLock(mLock);
+
+ CHECK(mIsEncryptionModule);
+
+ if (mHDCPModule == NULL) {
+ *outInputCTR = 0;
+
+ return NO_INIT;
+ }
+
+ return mHDCPModule->encryptNative(graphicBuffer->handle,
+ offset, size, streamCTR, outInputCTR, outData);
+}
+
status_t HDCP::decrypt(
const void *inData, size_t size,
uint32_t streamCTR, uint64_t outInputCTR, void *outData) {