Shaka Player Embedded
implementation_helper_impl.h
Go to the documentation of this file.
1 // Copyright 2017 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef SHAKA_EMBEDDED_JS_EME_IMPLEMENTATION_HELPER_IMPL_H_
16 #define SHAKA_EMBEDDED_JS_EME_IMPLEMENTATION_HELPER_IMPL_H_
17 
18 #include <string>
19 #include <unordered_map>
20 
22 #include "src/debug/mutex.h"
24 
25 namespace shaka {
26 namespace js {
27 namespace eme {
28 
29 class MediaKeys;
30 
35  public:
36  ImplementationHelperImpl(const std::string& key_system,
37  MediaKeys* media_keys);
38  ~ImplementationHelperImpl() override;
39 
40  std::string DataPathPrefix() const override;
41 
42  void OnMessage(const std::string& session_id,
43  MediaKeyMessageType message_type, const uint8_t* data,
44  size_t data_size) const override;
45  void OnKeyStatusChange(const std::string& session_id) const override;
46 
47  private:
48  mutable Mutex mutex_;
49  const std::string key_system_;
50  MediaKeys* media_keys_;
51 };
52 
53 } // namespace eme
54 } // namespace js
55 } // namespace shaka
56 
57 #endif // SHAKA_EMBEDDED_JS_EME_IMPLEMENTATION_HELPER_IMPL_H_
void OnKeyStatusChange(const std::string &session_id) const override
void OnMessage(const std::string &session_id, MediaKeyMessageType message_type, const uint8_t *data, size_t data_size) const override
ImplementationHelperImpl(const std::string &key_system, MediaKeys *media_keys)