Shaka Player Embedded
manifest.h
Go to the documentation of this file.
1 // Copyright 2020 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 // AUTO-GENERATED: DO NOT EDIT
16 
17 #ifndef SHAKA_EMBEDDED_INTERNAL_MANIFEST_H_
18 #define SHAKA_EMBEDDED_INTERNAL_MANIFEST_H_
19 
20 #include <string>
21 #include <vector>
22 
23 #include "shaka/optional.h"
24 #include "shaka/manifest.h"
25 #include "src/mapping/convert_js.h"
26 #include "src/mapping/struct.h"
27 
28 namespace shaka {
29 
30 namespace js {
31 
34 
35  ADD_DICT_FIELD(initDataType, std::string);
37 };
38 
39 struct DrmInfo : Struct {
41 
42  ADD_DICT_FIELD(keySystem, std::string);
43  ADD_DICT_FIELD(licenseServerUri, std::string);
44  ADD_DICT_FIELD(distinctiveIdentifierRequired, bool);
45  ADD_DICT_FIELD(persistentStateRequired, bool);
46  ADD_DICT_FIELD(audioRobustness, std::string);
47  ADD_DICT_FIELD(videoRobustness, std::string);
48  ADD_DICT_FIELD(initData, std::vector<shaka::js::InitDataOverride>);
49  ADD_DICT_FIELD(keyIds, std::vector<std::string>);
50 };
51 
52 
53 } // namespace js
54 
55 template <>
57  static bool FromJsValue(Handle<JsValue> source, shaka::InitDataOverride* dest) {
60  return false;
61  }
62  *dest = shaka::InitDataOverride(std::move(temp));
63  return true;
64  }
65 };
66 
67 template <>
69  static bool FromJsValue(Handle<JsValue> source, shaka::DrmInfo* dest) {
70  shaka::js::DrmInfo temp;
72  return false;
73  }
74  *dest = shaka::DrmInfo(std::move(temp));
75  return true;
76  }
77 };
78 
79 
80 } // namespace shaka
81 
82 #endif // SHAKA_EMBEDDED_INTERNAL_MANIFEST_H_
ADD_DICT_FIELD(initDataType, std::string)
const char * dest
Definition: media_utils.cc:31
static bool FromJsValue(Handle< JsValue > source, shaka::DrmInfo *dest)
Definition: manifest.h:69
DECLARE_STRUCT_SPECIAL_METHODS_MOVE_ONLY(InitDataOverride)
const char * source
Definition: media_utils.cc:30
static bool FromJsValue(Handle< JsValue > source, shaka::InitDataOverride *dest)
Definition: manifest.h:57