7 #ifndef MEDIA_FORMATS_MP4_ENCRYPTING_FRAGMENTER_H_
8 #define MEDIA_FORMATS_MP4_ENCRYPTING_FRAGMENTER_H_
10 #include "packager/media/formats/mp4/fragmenter.h"
12 namespace edash_packager {
15 class AesCtrEncryptor;
30 scoped_ptr<EncryptionKey> encryption_key,
32 uint8_t nalu_length_size);
55 EncryptionKey* encryption_key() {
return encryption_key_.get(); }
58 void set_encryption_key(scoped_ptr<EncryptionKey> encryption_key) {
59 encryption_key_ = encryption_key.Pass();
63 void EncryptBytes(uint8_t* data, uint32_t size);
64 Status EncryptSample(scoped_refptr<MediaSample> sample);
67 bool IsSubsampleEncryptionRequired() {
return nalu_length_size_ != 0; }
69 scoped_ptr<EncryptionKey> encryption_key_;
70 scoped_ptr<AesCtrEncryptor> encryptor_;
74 const uint8_t nalu_length_size_;
84 #endif // MEDIA_FORMATS_MP4_ENCRYPTING_FRAGMENTER_H_