7 #ifndef PACKAGER_MEDIA_BASE_KEY_SOURCE_H_
8 #define PACKAGER_MEDIA_BASE_KEY_SOURCE_H_
15 #include <packager/macros/classes.h>
16 #include <packager/media/base/fourccs.h>
17 #include <packager/media/base/protection_system_specific_info.h>
18 #include <packager/media/base/pssh_generator.h>
19 #include <packager/status.h>
26 enum class EmeInitDataType {
36 MAX = WIDEVINE_CLASSIC
40 std::vector<ProtectionSystemSpecificInfo> key_system_info;
44 std::vector<std::vector<uint8_t>>
key_ids;
45 std::vector<uint8_t> key;
46 std::vector<uint8_t> iv;
49 typedef std::map<std::string, std::unique_ptr<EncryptionKey>> EncryptionKeyMap;
62 virtual Status
FetchKeys(EmeInitDataType init_data_type,
63 const std::vector<uint8_t>& init_data) = 0;
70 virtual Status
GetKey(
const std::string& stream_label,
78 virtual Status
GetKey(
const std::vector<uint8_t>& key_id,
91 int32_t crypto_period_duration_in_seconds,
92 const std::string& stream_label,
All the methods that are virtual are virtual for mocking.