7 #ifndef PACKAGER_MEDIA_BASE_PROTECTION_SYSTEM_SPECIFIC_INFO_H_
8 #define PACKAGER_MEDIA_BASE_PROTECTION_SYSTEM_SPECIFIC_INFO_H_
14 #include <absl/log/check.h>
15 #include <absl/log/log.h>
17 #include <packager/crypto_params.h>
23 std::vector<uint8_t> system_id;
24 std::vector<uint8_t> psshs;
32 std::vector<ProtectionSystemSpecificInfo>* pssh_boxes);
42 static std::unique_ptr<PsshBoxBuilder>
ParseFromBox(
const uint8_t* data,
48 uint8_t pssh_box_version()
const {
return version_; }
49 const std::vector<uint8_t>& system_id()
const {
return system_id_; }
50 const std::vector<std::vector<uint8_t>>& key_ids()
const {
return key_ids_; }
51 const std::vector<uint8_t>& pssh_data()
const {
return pssh_data_; }
53 void set_pssh_box_version(uint8_t version) {
54 DCHECK_LT(version, 2);
57 void set_system_id(
const uint8_t* system_id,
size_t system_id_size) {
58 DCHECK_EQ(16u, system_id_size);
59 system_id_.assign(system_id, system_id + system_id_size);
61 void add_key_id(
const std::vector<uint8_t>& key_id) {
62 key_ids_.push_back(key_id);
64 void clear_key_ids() { key_ids_.clear(); }
65 void set_pssh_data(
const std::vector<uint8_t>& pssh_data) {
66 pssh_data_ = pssh_data;
74 std::vector<uint8_t> system_id_;
75 std::vector<std::vector<uint8_t>> key_ids_;
76 std::vector<uint8_t> pssh_data_;
All the methods that are virtual are virtual for mocking.