7 #ifndef MEDIA_FORMATS_MP4_ENCRYPTING_FRAGMENTER_H_
8 #define MEDIA_FORMATS_MP4_ENCRYPTING_FRAGMENTER_H_
10 #include "packager/base/memory/ref_counted.h"
11 #include "packager/base/memory/scoped_ptr.h"
12 #include "packager/media/filters/vpx_parser.h"
13 #include "packager/media/formats/mp4/fragmenter.h"
14 #include "packager/media/formats/mp4/video_slice_header_parser.h"
16 namespace edash_packager {
19 class AesCtrEncryptor;
34 scoped_ptr<EncryptionKey> encryption_key,
58 EncryptionKey* encryption_key() {
return encryption_key_.get(); }
61 void set_encryption_key(scoped_ptr<EncryptionKey> encryption_key) {
62 encryption_key_ = encryption_key.Pass();
66 void EncryptBytes(uint8_t* data, uint32_t size);
67 Status EncryptSample(scoped_refptr<MediaSample> sample);
72 uint8_t GetNaluLengthSize();
74 bool IsSubsampleEncryptionRequired();
76 scoped_refptr<StreamInfo> info_;
77 scoped_ptr<EncryptionKey> encryption_key_;
78 scoped_ptr<AesCtrEncryptor> encryptor_;
81 scoped_ptr<VPxParser> vpx_parser_;
82 scoped_ptr<VideoSliceHeaderParser> header_parser_;
91 #endif // MEDIA_FORMATS_MP4_ENCRYPTING_FRAGMENTER_H_