Shaka Player Embedded
track.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_TRACK_H_
18 #define SHAKA_EMBEDDED_INTERNAL_TRACK_H_
19 
20 #include <string>
21 #include <vector>
22 
23 #include "shaka/optional.h"
24 #include "shaka/track.h"
25 #include "src/mapping/convert_js.h"
26 #include "src/mapping/struct.h"
27 
28 namespace shaka {
29 
30 namespace js {
31 
32 struct Track : Struct {
34 
35  ADD_DICT_FIELD(id, double);
36  ADD_DICT_FIELD(active, bool);
37  ADD_DICT_FIELD(type, std::string);
38  ADD_DICT_FIELD(bandwidth, double);
39  ADD_DICT_FIELD(language, std::string);
49  ADD_DICT_FIELD(primary, bool);
50  ADD_DICT_FIELD(roles, std::vector<std::string>);
54  ADD_DICT_FIELD(audioBandwidth, shaka::optional<double>);
55  ADD_DICT_FIELD(videoBandwidth, shaka::optional<double>);
56 };
57 
58 
59 } // namespace js
60 
61 template <>
63  static bool FromJsValue(Handle<JsValue> source, shaka::Track* dest) {
64  shaka::js::Track temp;
66  return false;
67  }
68  *dest = shaka::Track(std::move(temp));
69  return true;
70  }
71 };
72 
73 
74 } // namespace shaka
75 
76 #endif // SHAKA_EMBEDDED_INTERNAL_TRACK_H_
static bool FromJsValue(Handle< JsValue > source, shaka::Track *dest)
Definition: track.h:63
const char * dest
Definition: media_utils.cc:31
int width
const char * source
Definition: media_utils.cc:30
ExceptionCode type
int height
ADD_DICT_FIELD(id, double)
DECLARE_STRUCT_SPECIAL_METHODS_MOVE_ONLY(Track)