Shaka Player Embedded
clearkey_implementation_factory.cc
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 
16 
18 
19 namespace shaka {
20 namespace eme {
21 
23  MediaKeySessionType type) const {
24  return type == MediaKeySessionType::Temporary;
25 }
26 
28  MediaKeyInitDataType type) const {
29  return type == MediaKeyInitDataType::KeyIds ||
31 }
32 
34  const std::string& robustness) const {
35  return robustness.empty();
36 }
37 
39  const std::string& robustness) const {
40  return robustness.empty();
41 }
42 
44  const {
46 }
47 
50 }
51 
52 std::shared_ptr<Implementation>
54  ImplementationHelper* helper,
55  MediaKeysRequirement /* distinctive_identifier */,
56  MediaKeysRequirement /* persistent_state */,
57  const std::vector<std::string>& /* audio_robustness */,
58  const std::vector<std::string>& /* video_robustness */) {
59  return std::shared_ptr<Implementation>{new ClearKeyImplementation(helper)};
60 }
61 
62 } // namespace eme
63 } // namespace shaka
MediaKeysRequirement DistinctiveIdentifier() const override
MediaKeysRequirement PersistentState() const override
ExceptionCode type
bool SupportsSessionType(MediaKeySessionType type) const override
bool SupportsInitDataType(MediaKeyInitDataType type) const override
std::shared_ptr< Implementation > CreateImplementation(ImplementationHelper *helper, MediaKeysRequirement distinctive_identifier, MediaKeysRequirement persistent_state, const std::vector< std::string > &audio_robustness, const std::vector< std::string > &video_robustness) override
bool SupportsAudioRobustness(const std::string &robustness) const override
bool SupportsVideoRobustness(const std::string &robustness) const override