7 #include <packager/media/base/pssh_generator_util.h>
11 #include <packager/media/base/widevine_pssh_data.pb.h>
17 std::vector<uint8_t> StringToBytes(
const std::string&
string) {
18 return std::vector<uint8_t>(
string.begin(),
string.end());
22 std::vector<uint8_t> GenerateWidevinePsshDataFromKeyIds(
23 const std::vector<std::vector<uint8_t>>& key_ids) {
24 media::WidevinePsshData widevine_pssh_data;
25 for (
const std::vector<uint8_t>& key_id : key_ids)
26 widevine_pssh_data.add_key_id(key_id.data(), key_id.size());
27 return StringToBytes(widevine_pssh_data.SerializeAsString());
All the methods that are virtual are virtual for mocking.