Shaka Player Embedded
media_capabilities.h
Go to the documentation of this file.
1 // Copyright 2019 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_CAPABILITIES_H_
16 #define SHAKA_EMBEDDED_MEDIA_MEDIA_CAPABILITIES_H_
17 
18 #include <string>
19 #include <vector>
20 
21 #include "../eme/configuration.h"
22 #include "../macros.h"
23 
24 namespace shaka {
25 namespace media {
26 
34 
36 enum class MediaDecodingType : uint8_t {
38  File,
39 
42 };
43 
45 enum class HdrMetadataType : uint8_t {
50 };
51 
53 enum class ColorGamut : uint8_t {
55 
57  SRGB,
58 
60  P3,
61 
63  REC2020,
64 };
65 
67 enum class TransferFunction : uint8_t {
69 
71  SRGB,
72 
76  PQ,
77 
79  HLG,
80 };
81 
90 
95  std::string content_type;
96 
98  uint32_t width;
99 
101  uint32_t height;
102 
104  uint64_t bitrate;
105 
107  double framerate;
108 
111 
114 
117 
120 };
121 
130 
135  std::string content_type;
136 
138  uint16_t channels;
139 
141  uint64_t bitrate;
142 
144  uint32_t samplerate;
145 
148 };
149 
152 
154  std::string robustness;
155 };
156 
168 
170  std::string key_system;
171 
174 
177 
180 
182  std::vector<eme::MediaKeySessionType> session_types;
183 
186 
189 };
190 
194 
197 
200 
203 
206 };
207 
211 
213  bool supported;
214 
216  bool smooth;
217 
220 
221 
222  MediaCapabilitiesInfo operator&(const MediaCapabilitiesInfo& other) const {
224  ret.supported = supported & other.supported;
225  ret.smooth = supported & other.smooth;
226  ret.power_efficient = supported & other.power_efficient;
227  return ret;
228  }
229 };
230 
232 
233 } // namespace media
234 } // namespace shaka
235 
236 #endif // SHAKA_EMBEDDED_MEDIA_MEDIA_CAPABILITIES_H_
#define SHAKA_EXPORT
Definition: macros.h:30
std::vector< eme::MediaKeySessionType > session_types
MediaCapabilitiesKeySystemConfiguration key_system_configuration
#define SHAKA_DECLARE_STRUCT_SPECIAL_METHODS(Type)
Definition: macros.h:34