5 #ifndef PACKAGER_MEDIA_BASE_DECRYPT_CONFIG_H_ 6 #define PACKAGER_MEDIA_BASE_DECRYPT_CONFIG_H_ 13 #include "packager/base/macros.h" 14 #include "packager/media/base/fourccs.h" 30 : clear_bytes(0), cipher_bytes(0) {}
32 : clear_bytes(clear_bytes), cipher_bytes(cipher_bytes) {}
35 uint32_t cipher_bytes;
43 static const size_t kDecryptionKeySize = 16;
52 const std::vector<uint8_t>& iv,
53 const std::vector<SubsampleEntry>& subsamples);
68 const std::vector<uint8_t>& iv,
69 const std::vector<SubsampleEntry>& subsamples,
70 FourCC protection_scheme,
71 uint8_t crypt_byte_block,
72 uint8_t skip_byte_block);
81 subsamples_.emplace_back(clear_bytes, cipher_bytes);
85 size_t GetTotalSizeOfSubsamples()
const;
87 const std::vector<uint8_t>& key_id()
const {
return key_id_; }
88 const std::vector<uint8_t>& iv()
const {
return iv_; }
89 const std::vector<SubsampleEntry>& subsamples()
const {
return subsamples_; }
90 FourCC protection_scheme()
const {
return protection_scheme_; }
91 uint8_t crypt_byte_block()
const {
return crypt_byte_block_; }
92 uint8_t skip_byte_block()
const {
return skip_byte_block_; }
95 const std::vector<uint8_t> key_id_;
98 const std::vector<uint8_t> iv_;
102 std::vector<SubsampleEntry> subsamples_;
104 const FourCC protection_scheme_;
106 const uint8_t crypt_byte_block_;
107 const uint8_t skip_byte_block_;
115 #endif // PACKAGER_MEDIA_BASE_DECRYPT_CONFIG_H_
All the methods that are virtual are virtual for mocking.