Some crypto stuff, error codes
Add crypto/drm related functions, define some media errors
instead of using magic numbers in the code.
Change-Id: I5924cba0bfcdb3623073c9182a646b70f4ead5a5
diff --git a/include/ndk/NdkMediaExtractor.h b/include/ndk/NdkMediaExtractor.h
index a7c32c4..9e50ec0 100644
--- a/include/ndk/NdkMediaExtractor.h
+++ b/include/ndk/NdkMediaExtractor.h
@@ -30,7 +30,9 @@
#include <sys/types.h>
+#include "NdkMediaCodec.h"
#include "NdkMediaFormat.h"
+#include "NdkMediaCrypto.h"
#ifdef __cplusplus
extern "C" {
@@ -112,6 +114,33 @@
*/
bool AMediaExtractor_advance(AMediaExtractor*);
+
+/**
+ * mapping of crypto scheme uuid to the scheme specific data for that scheme
+ */
+typedef struct PsshEntry {
+ AMediaUUID uuid;
+ size_t datalen;
+ void *data;
+} PsshEntry;
+
+/**
+ * list of crypto schemes and their data
+ */
+typedef struct PsshInfo {
+ size_t numentries;
+ PsshEntry entries[0];
+} PsshInfo;
+
+/**
+ * Get the PSSH info if present.
+ */
+PsshInfo* AMediaExtractor_getPsshInfo(AMediaExtractor*);
+
+
+AMediaCodecCryptoInfo *AMediaExtractor_getSampleCryptoInfo(AMediaExtractor *);
+
+
enum {
AMEDIAEXTRACTOR_SAMPLE_FLAG_SYNC = 1,
AMEDIAEXTRACTOR_SAMPLE_FLAG_ENCRYPTED = 2,