7#ifndef PACKAGER_MEDIA_BASE_KEY_SOURCE_H_
8#define PACKAGER_MEDIA_BASE_KEY_SOURCE_H_
16#include <packager/macros/classes.h>
17#include <packager/media/base/protection_system_specific_info.h>
18#include <packager/status.h>
25enum class EmeInitDataType {
35 MAX = WIDEVINE_CLASSIC
39 std::vector<ProtectionSystemSpecificInfo> key_system_info;
43 std::vector<std::vector<uint8_t>>
key_ids;
44 std::vector<uint8_t> key;
45 std::vector<uint8_t> iv;
53typedef std::map<std::string, std::unique_ptr<EncryptionKey>> EncryptionKeyMap;
66 virtual Status
FetchKeys(EmeInitDataType init_data_type,
67 const std::vector<uint8_t>& init_data) = 0;
74 virtual Status
GetKey(
const std::string& stream_label,
82 virtual Status
GetKey(
const std::vector<uint8_t>& key_id,
95 int32_t crypto_period_duration_in_seconds,
96 const std::string& stream_label,
All the methods that are virtual are virtual for mocking.