summaryrefslogtreecommitdiff
path: root/libavformat/isom.h
diff options
context:
space:
mode:
authorerankor <eran.kornblau@kaltura.com>2015-12-07 12:30:50 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-31 16:46:36 +0100
commit3f8564fe3c68a29a137ada2400bd9dcd3928bfb1 (patch)
tree22e94adc1c1ee8076fe6647542527c04a5583b45 /libavformat/isom.h
parent15e1fd9883b4a2898635212b4e167823755d1653 (diff)
avformat/mov: support cenc (common encryption)
support reading encrypted mp4 using aes-ctr, conforming to ISO/IEC 23001-7. a new parameter was added: - decryption_key - 128 bit decryption key (hex) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/isom.h')
-rw-r--r--libavformat/isom.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavformat/isom.h b/libavformat/isom.h
index 255efd1cfc..e07dc0e9ca 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -37,6 +37,8 @@ extern const AVCodecTag ff_codec_movsubtitle_tags[];
int ff_mov_iso639_to_lang(const char lang[4], int mp4);
int ff_mov_lang_to_iso639(unsigned code, char to[4]);
+struct AVAESCTR;
+
/* the QuickTime file format is quite convoluted...
* it has lots of index tables, each indexing something in another one...
* Here we just use what is needed to read the chunks
@@ -168,6 +170,15 @@ typedef struct MOVStreamContext {
int64_t duration_for_fps;
int32_t *display_matrix;
+ uint32_t format;
+
+ struct {
+ int use_subsamples;
+ uint8_t* auxiliary_info;
+ uint8_t* auxiliary_info_end;
+ uint8_t* auxiliary_info_pos;
+ struct AVAESCTR* aes_ctr;
+ } cenc;
} MOVStreamContext;
typedef struct MOVContext {
@@ -214,6 +225,8 @@ typedef struct MOVContext {
void *audible_fixed_key;
int audible_fixed_key_size;
struct AVAES *aes_decrypt;
+ uint8_t *decryption_key;
+ int decryption_key_len;
} MOVContext;
int ff_mp4_read_descr_len(AVIOContext *pb);