Shaka Player Embedded
track.cc
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 #include "shaka/track.h"
18 
19 #include "src/js/track.h"
20 
21 namespace shaka {
22 
23 class Track::Impl {
24  public:
25  const double id{};
26  const bool active{};
27  const std::string type{};
28  const double bandwidth{};
29  const std::string language{};
39  const bool primary{};
40  const std::vector<std::string> roles{};
46 
47  Impl() {}
48  Impl(js::Track&& internal)
49  : id(std::move(internal.id)),
50  active(std::move(internal.active)),
51  type(std::move(internal.type)),
53  language(std::move(internal.language)),
54  label(std::move(internal.label)),
55  kind(std::move(internal.kind)),
56  width(std::move(internal.width)),
57  height(std::move(internal.height)),
59  mimeType(std::move(internal.mimeType)),
60  codecs(std::move(internal.codecs)),
63  primary(std::move(internal.primary)),
64  roles(std::make_move_iterator(internal.roles.begin()), std::make_move_iterator(internal.roles.end())),
65  videoId(std::move(internal.videoId)),
66  audioId(std::move(internal.audioId)),
70 };
71 
72 Track::Track() : impl_(new Impl) {}
73 Track::Track(js::Track&& internal) : impl_(new Impl{std::move(internal)}) {}
74 Track::Track(const Track&) = default;
75 Track::Track(Track&&) = default;
77 
78 Track& Track::operator=(const Track&) = default;
79 Track& Track::operator=(Track&&) = default;
80 
81 double Track::id() const {
82  return impl_->id;
83 }
84 
85 bool Track::active() const {
86  return impl_->active;
87 }
88 
89 const std::string& Track::type() const {
90  return impl_->type;
91 }
92 
93 double Track::bandwidth() const {
94  return impl_->bandwidth;
95 }
96 
97 const std::string& Track::language() const {
98  return impl_->language;
99 }
100 
102  return impl_->label;
103 }
104 
106  return impl_->kind;
107 }
108 
110  return impl_->width;
111 }
112 
114  return impl_->height;
115 }
116 
118  return impl_->frameRate;
119 }
120 
122  return impl_->mimeType;
123 }
124 
126  return impl_->codecs;
127 }
128 
130  return impl_->audioCodec;
131 }
132 
134  return impl_->videoCodec;
135 }
136 
137 bool Track::primary() const {
138  return impl_->primary;
139 }
140 
141 const std::vector<std::string>& Track::roles() const {
142  return impl_->roles;
143 }
144 
146  return impl_->videoId;
147 }
148 
150  return impl_->audioId;
151 }
152 
154  return impl_->channelsCount;
155 }
156 
158  return impl_->audioBandwidth;
159 }
160 
162  return impl_->videoBandwidth;
163 }
164 
165 
167  js::Track ret;
168  ret.id = impl_->id;
169  ret.active = impl_->active;
170  ret.type = impl_->type;
171  ret.bandwidth = impl_->bandwidth;
172  ret.language = impl_->language;
173  ret.label = impl_->label;
174  ret.kind = impl_->kind;
175  ret.width = impl_->width;
176  ret.height = impl_->height;
177  ret.frameRate = impl_->frameRate;
178  ret.mimeType = impl_->mimeType;
179  ret.codecs = impl_->codecs;
180  ret.audioCodec = impl_->audioCodec;
181  ret.videoCodec = impl_->videoCodec;
182  ret.primary = impl_->primary;
183  ret.roles = impl_->roles;
184  ret.videoId = impl_->videoId;
185  ret.audioId = impl_->audioId;
186  ret.channelsCount = impl_->channelsCount;
187  ret.audioBandwidth = impl_->audioBandwidth;
188  ret.videoBandwidth = impl_->videoBandwidth;
189  return ret;
190 }
191 
192 
193 
194 } // namespace shaka
shaka::optional< std::string > label() const
Definition: track.cc:101
const shaka::optional< std::string > audioCodec
Definition: track.cc:37
shaka::optional< std::string > kind() const
Definition: track.cc:105
shaka::optional< double > audio_bandwidth() const
Definition: track.cc:157
shaka::optional< double > video_bandwidth() const
Definition: track.cc:161
double bandwidth() const
Definition: track.cc:93
const shaka::optional< std::string > label
Definition: track.cc:30
double id() const
Definition: track.cc:81
shaka::optional< std::string > video_codec() const
Definition: track.cc:133
const shaka::optional< double > audioId
Definition: track.cc:42
shaka::optional< std::string > audio_codec() const
Definition: track.cc:129
const double id
Definition: track.cc:25
const shaka::optional< double > frameRate
Definition: track.cc:34
shaka::optional< double > audio_id() const
Definition: track.cc:149
bool active() const
Definition: track.cc:85
const shaka::optional< double > width
Definition: track.cc:32
const shaka::optional< std::string > videoCodec
Definition: track.cc:38
const shaka::optional< double > height
Definition: track.cc:33
const std::string & language() const
Definition: track.cc:97
const shaka::optional< double > videoId
Definition: track.cc:41
Impl(js::Track &&internal)
Definition: track.cc:48
const shaka::optional< double > videoBandwidth
Definition: track.cc:45
shaka::optional< std::string > codecs() const
Definition: track.cc:125
Track & operator=(const Track &)
shaka::optional< double > height() const
Definition: track.cc:113
js::Track GetInternal() const
Definition: track.cc:166
const shaka::optional< double > audioBandwidth
Definition: track.cc:44
const shaka::optional< double > channelsCount
Definition: track.cc:43
const bool active
Definition: track.cc:26
const shaka::optional< std::string > codecs
Definition: track.cc:36
const double bandwidth
Definition: track.cc:28
shaka::optional< double > width() const
Definition: track.cc:109
const shaka::optional< std::string > kind
Definition: track.cc:31
const std::string & type() const
Definition: track.cc:89
shaka::optional< std::string > mime_type() const
Definition: track.cc:121
const bool primary
Definition: track.cc:39
const std::string type
Definition: track.cc:27
bool primary() const
Definition: track.cc:137
const std::vector< std::string > & roles() const
Definition: track.cc:141
const std::vector< std::string > roles
Definition: track.cc:40
const std::string language
Definition: track.cc:29
const shaka::optional< std::string > mimeType
Definition: track.cc:35
shaka::optional< double > channels_count() const
Definition: track.cc:153
shaka::optional< double > frame_rate() const
Definition: track.cc:117
shaka::optional< double > video_id() const
Definition: track.cc:145