Shaka Player Embedded
media_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 #ifndef SHAKA_EMBEDDED_MEDIA_MEDIA_TRACK_H_
16 #define SHAKA_EMBEDDED_MEDIA_MEDIA_TRACK_H_
17 
18 #include <memory>
19 #include <string>
20 
21 #include "../macros.h"
22 
23 namespace shaka {
24 namespace media {
25 
31 enum class MediaTrackKind : uint8_t {
32  Unknown,
33 
39 
44  Captions,
45 
48 
50  Main,
51 
53  MainDesc,
54 
56  Sign,
57 
62  Subtitles,
63 
66 
71  Commentary,
72 };
73 
80  public:
81  MediaTrack(MediaTrackKind kind, const std::string& label,
82  const std::string& language, const std::string& id);
83  virtual ~MediaTrack();
84 
86 
88  const std::string label;
89 
91  const std::string language;
92 
94  const std::string id;
95 
98 
99 
101  virtual bool enabled() const;
102 
104  virtual void SetEnabled(bool enabled);
105 
106  private:
107  class Impl;
108  std::unique_ptr<Impl> impl_;
109  bool enabled_;
110 };
111 
112 } // namespace media
113 } // namespace shaka
114 
115 #endif // SHAKA_EMBEDDED_MEDIA_MEDIA_TRACK_H_
const std::string language
Definition: media_track.h:91
#define SHAKA_EXPORT
Definition: macros.h:30
const std::string id
Definition: media_track.h:94
#define SHAKA_NON_COPYABLE_OR_MOVABLE_TYPE(Type)
Definition: macros.h:51
const std::string label
Definition: media_track.h:88
const MediaTrackKind kind
Definition: media_track.h:97