summaryrefslogtreecommitdiff
path: root/libavformat/movenc.h
diff options
context:
space:
mode:
authorerankor <eran.kornblau@kaltura.com>2015-12-07 12:01:09 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-15 14:16:28 +0100
commit4469e8ebb2f370794c88aa51d528d1d899d29ddc (patch)
treea8507e8eb328c0aee020809be37941bd37882844 /libavformat/movenc.h
parent23ac99dc17b0c4ff43bb56c1f8cbe7feb34bada5 (diff)
movenc: support cenc (common encryption)
support writing encrypted mp4 using aes-ctr, conforming to ISO/IEC 23001-7. 3 new parameters were added: - encryption_scheme - allowed values are none (default) and cenc-aes-ctr - encryption_key - 128 bit encryption key (hex) - encryption_kid - 128 bit encryption key identifier (hex) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/movenc.h')
-rw-r--r--libavformat/movenc.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavformat/movenc.h b/libavformat/movenc.h
index 06adf2b121..deb90fe2a7 100644
--- a/libavformat/movenc.h
+++ b/libavformat/movenc.h
@@ -25,6 +25,7 @@
#define AVFORMAT_MOVENC_H
#include "avformat.h"
+#include "movenccenc.h"
#define MOV_FRAG_INFO_ALLOC_INCREMENT 64
#define MOV_INDEX_CLUSTER_SIZE 1024
@@ -149,8 +150,15 @@ typedef struct MOVTrack {
} vc1_info;
void *eac3_priv;
+
+ MOVMuxCencContext cenc;
} MOVTrack;
+typedef enum {
+ MOV_ENC_NONE = 0,
+ MOV_ENC_CENC_AES_CTR,
+} MOVEncryptionScheme;
+
typedef struct MOVMuxContext {
const AVClass *av_class;
int mode;
@@ -193,6 +201,14 @@ typedef struct MOVMuxContext {
int frag_interleave;
int missing_duration_warned;
+
+ char *encryption_scheme_str;
+ MOVEncryptionScheme encryption_scheme;
+ uint8_t *encryption_key;
+ int encryption_key_len;
+ uint8_t *encryption_kid;
+ int encryption_kid_len;
+
} MOVMuxContext;
#define FF_MOV_FLAG_RTP_HINT (1 << 0)