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/base/encryption_modes.h"
13 #include "packager/media/filters/vpx_parser.h"
14 #include "packager/media/formats/mp4/fragmenter.h"
15 #include "packager/media/formats/mp4/video_slice_header_parser.h"
17 namespace edash_packager {
35 scoped_ptr<EncryptionKey> encryption_key,
37 EncryptionMode encryption_mode);
60 EncryptionKey* encryption_key() {
return encryption_key_.get(); }
63 void set_encryption_key(scoped_ptr<EncryptionKey> encryption_key) {
64 encryption_key_ = encryption_key.Pass();
68 void EncryptBytes(uint8_t* data, uint32_t size);
69 Status EncryptSample(scoped_refptr<MediaSample> sample);
72 bool IsSubsampleEncryptionRequired();
74 scoped_refptr<StreamInfo> info_;
75 scoped_ptr<EncryptionKey> encryption_key_;
76 scoped_ptr<AesEncryptor> encryptor_;
80 const uint8_t nalu_length_size_;
81 const VideoCodec video_codec_;
83 EncryptionMode encryption_mode_;
85 scoped_ptr<VPxParser> vpx_parser_;
86 scoped_ptr<VideoSliceHeaderParser> header_parser_;
95 #endif // MEDIA_FORMATS_MP4_ENCRYPTING_FRAGMENTER_H_