34 const std::string& key_system,
MediaKeys* media_keys)
35 : mutex_(
"ImplementationHelper"),
36 key_system_(key_system),
37 media_keys_(media_keys) {}
43 std::unique_lock<Mutex> lock(mutex_);
45 reinterpret_cast<const uint8_t*>(key_system_.data()), key_system_.size());
54 size_t data_size)
const {
55 std::unique_lock<Mutex> lock(mutex_);
59 EventType::Message, message_type,
ByteBuffer(data, data_size));
64 const std::string& session_id)
const {
65 std::unique_lock<Mutex> lock(mutex_);
68 session->ScheduleEvent<
events::Event>(EventType::KeyStatusesChange);
void OnKeyStatusChange(const std::string &session_id) const override
~ImplementationHelperImpl() override
std::string ToHexString(const uint8_t *data, size_t data_size)
void OnMessage(const std::string &session_id, MediaKeyMessageType message_type, const uint8_t *data, size_t data_size) const override
static JsManagerImpl * Instance()
std::string DataPathPrefix() const override
static std::string PathJoin(const std::string &a, const std::string &b)
std::vector< uint8_t > HashData(const uint8_t *data, size_t size)
ImplementationHelperImpl(const std::string &key_system, MediaKeys *media_keys)