Shaka Player Embedded
stream_info.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_STREAM_INFO_H_
16 #define SHAKA_EMBEDDED_MEDIA_STREAM_INFO_H_
17 
18 #include <memory>
19 #include <string>
20 #include <vector>
21 
22 #include "../macros.h"
23 #include "../utils.h"
24 
25 namespace shaka {
26 namespace media {
27 
34  public:
35  StreamInfo(const std::string& mime, const std::string& codec, bool is_video,
36  Rational<uint32_t> time_scale,
37  Rational<uint32_t> sample_aspect_ratio,
38  const std::vector<uint8_t>& extra_data,
39  uint32_t width, uint32_t height, uint32_t channel_count,
40  uint32_t sample_rate);
41  virtual ~StreamInfo();
42 
44 
49  const std::string mime_type;
50 
57  const std::string codec;
58 
65 
71 
73  const std::vector<uint8_t> extra_data;
74 
76  const bool is_video;
77 
79  const uint32_t width;
80 
82  const uint32_t height;
83 
85  const uint32_t channel_count;
86 
91  const uint32_t sample_rate;
92 
93  private:
94  class Impl;
95  std::unique_ptr<Impl> impl_;
96 };
97 
98 } // namespace media
99 } // namespace shaka
100 
101 #endif // SHAKA_EMBEDDED_MEDIA_STREAM_INFO_H_
const uint32_t height
Definition: stream_info.h:82
#define SHAKA_EXPORT
Definition: macros.h:30
const uint32_t sample_rate
Definition: stream_info.h:91
#define SHAKA_NON_COPYABLE_OR_MOVABLE_TYPE(Type)
Definition: macros.h:51
const std::vector< uint8_t > extra_data
Definition: stream_info.h:73
int width
const std::string mime_type
Definition: stream_info.h:49
const Rational< uint32_t > sample_aspect_ratio
Definition: stream_info.h:70
int height
const std::string codec
Definition: stream_info.h:57
const uint32_t channel_count
Definition: stream_info.h:85
const Rational< uint32_t > time_scale
Definition: stream_info.h:64
const uint32_t width
Definition: stream_info.h:79