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_TRACK_H_
18 #define SHAKA_EMBEDDED_TRACK_H_
19 
20 #include <memory>
21 #include <string>
22 #include <unordered_map>
23 #include <vector>
24 
25 #include "macros.h"
26 #include "optional.h"
27 
28 namespace shaka {
29 
30 namespace js {
31 
32 struct Track;
33 
34 } // namespace js
35 
44 class SHAKA_EXPORT Track final {
45  public:
46  Track();
47  Track(js::Track&& internal);
48  Track(const Track&);
49  Track(Track&&);
50  ~Track();
51 
52  Track& operator=(const Track&);
53  Track& operator=(Track&&);
54 
56  double id() const;
61  bool active() const;
63  const std::string& type() const;
65  double bandwidth() const;
70  const std::string& language() const;
72  shaka::optional<std::string> label() const;
77  shaka::optional<std::string> kind() const;
83  shaka::optional<double> frame_rate() const;
85  shaka::optional<std::string> mime_type() const;
87  shaka::optional<std::string> codecs() const;
89  shaka::optional<std::string> audio_codec() const;
91  shaka::optional<std::string> video_codec() const;
99  bool primary() const;
101  const std::vector<std::string>& roles() const;
103  shaka::optional<double> video_id() const;
105  shaka::optional<double> audio_id() const;
107  shaka::optional<double> channels_count() const;
109  shaka::optional<double> audio_bandwidth() const;
111  shaka::optional<double> video_bandwidth() const;
112 
114  js::Track GetInternal() const;
115 
116  private:
117  class Impl;
118  std::shared_ptr<Impl> impl_;
119 };
120 
121 
122 } // namespace shaka
123 
124 #endif // SHAKA_EMBEDDED_TRACK_H_
#define SHAKA_EXPORT
Definition: macros.h:30
int width
ExceptionCode type
int height