summaryrefslogtreecommitdiffstats
path: root/include/media/hardware/CryptoAPI.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/hardware/CryptoAPI.h')
-rw-r--r--include/media/hardware/CryptoAPI.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/media/hardware/CryptoAPI.h b/include/media/hardware/CryptoAPI.h
index c800825..3e3257f 100644
--- a/include/media/hardware/CryptoAPI.h
+++ b/include/media/hardware/CryptoAPI.h
@@ -14,7 +14,9 @@
* limitations under the License.
*/
+#include <media/stagefright/MediaErrors.h>
#include <utils/Errors.h>
+#include <utils/Vector.h>
#ifndef CRYPTO_API_H_
@@ -68,7 +70,18 @@ struct CryptoPlugin {
// the resolution of the video being decrypted. The media player should
// call this method when the resolution is determined and any time it
// is subsequently changed.
- virtual void notifyResolution(uint32_t width, uint32_t height) {}
+
+ virtual void notifyResolution(uint32_t /* width */, uint32_t /* height */) {}
+
+ // A MediaDrm session may be associated with a MediaCrypto session. The
+ // associated MediaDrm session is used to load decryption keys
+ // into the crypto/drm plugin. The keys are then referenced by key-id
+ // in the 'key' parameter to the decrypt() method.
+ // Should return NO_ERROR on success, ERROR_DRM_SESSION_NOT_OPENED if
+ // the session is not opened and a code from MediaErrors.h otherwise.
+ virtual status_t setMediaDrmSession(const Vector<uint8_t> & /*sessionId */) {
+ return ERROR_UNSUPPORTED;
+ }
// If the error returned falls into the range
// ERROR_DRM_VENDOR_MIN..ERROR_DRM_VENDOR_MAX, errorDetailMsg should be