OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
166 uint32_t timestamp_; | 166 uint32_t timestamp_; |
167 int64_t ntp_time_ms_; | 167 int64_t ntp_time_ms_; |
168 int64_t render_time_ms_; | 168 int64_t render_time_ms_; |
169 VideoRotation rotation_; | 169 VideoRotation rotation_; |
170 }; | 170 }; |
171 | 171 |
172 | 172 |
173 // TODO(pbos): Rename EncodedFrame and reformat this class' members. | 173 // TODO(pbos): Rename EncodedFrame and reformat this class' members. |
174 class EncodedImage { | 174 class EncodedImage { |
175 public: | 175 public: |
176 // Some decoders require encoded image buffers to be padded with a small | |
177 // number of additional bytes (due to over-reading byte readers). | |
178 static size_t GetBufferPadding(VideoCodecType codec_type); | |
hbos
2016/01/19 14:22:18
(I originally wanted to place this in VideoDecoder
stefan-webrtc
2016/01/19 15:06:20
Somewhat... VideoDecoder would probably have been
hbos
2016/01/19 16:50:34
They look weird to me.
| |
179 | |
176 EncodedImage() : EncodedImage(nullptr, 0, 0) {} | 180 EncodedImage() : EncodedImage(nullptr, 0, 0) {} |
177 EncodedImage(uint8_t* buffer, size_t length, size_t size) | 181 EncodedImage(uint8_t* buffer, size_t length, size_t size) |
178 : _buffer(buffer), _length(length), _size(size) {} | 182 : _buffer(buffer), _length(length), _size(size) {} |
179 | 183 |
180 struct AdaptReason { | 184 struct AdaptReason { |
181 AdaptReason() | 185 AdaptReason() |
182 : quality_resolution_downscales(-1), | 186 : quality_resolution_downscales(-1), |
183 bw_resolutions_disabled(-1) {} | 187 bw_resolutions_disabled(-1) {} |
184 | 188 |
185 int quality_resolution_downscales; // Number of times this frame is down | 189 int quality_resolution_downscales; // Number of times this frame is down |
(...skipping 13 matching lines...) Expand all Loading... | |
199 uint8_t* _buffer; | 203 uint8_t* _buffer; |
200 size_t _length; | 204 size_t _length; |
201 size_t _size; | 205 size_t _size; |
202 bool _completeFrame = false; | 206 bool _completeFrame = false; |
203 AdaptReason adapt_reason_; | 207 AdaptReason adapt_reason_; |
204 int qp_ = -1; // Quantizer value. | 208 int qp_ = -1; // Quantizer value. |
205 }; | 209 }; |
206 | 210 |
207 } // namespace webrtc | 211 } // namespace webrtc |
208 #endif // WEBRTC_VIDEO_FRAME_H_ | 212 #endif // WEBRTC_VIDEO_FRAME_H_ |
OLD | NEW |