stagefright: ICrypto: enable passing secure buffers in native_handle
Previously secure buffers were passed as opaque
void * values, which no longer works since
mediadrmserver is now a separate process from
mediaserver.
Bug: 22990512
Change-Id: I5c458ba19e78e20d1bd5a5899df0bce16f71bfd8
diff --git a/include/media/ICrypto.h b/include/media/ICrypto.h
index 5e324ad..a4bfaf8 100644
--- a/include/media/ICrypto.h
+++ b/include/media/ICrypto.h
@@ -46,8 +46,14 @@
virtual status_t setMediaDrmSession(const Vector<uint8_t> &sessionId) = 0;
+ enum DestinationType {
+ kDestinationTypeVmPointer, // non-secure
+ kDestinationTypeOpaqueHandle, // secure
+ kDestinationTypeNativeHandle // secure
+ };
+
virtual ssize_t decrypt(
- bool secure,
+ DestinationType dstType,
const uint8_t key[16],
const uint8_t iv[16],
CryptoPlugin::Mode mode,