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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 kSkipFrame = 4 | 174 kSkipFrame = 4 |
175 }; | 175 }; |
176 | 176 |
177 // TODO(pbos): Rename EncodedFrame and reformat this class' members. | 177 // TODO(pbos): Rename EncodedFrame and reformat this class' members. |
178 class EncodedImage { | 178 class EncodedImage { |
179 public: | 179 public: |
180 EncodedImage() : EncodedImage(nullptr, 0, 0) {} | 180 EncodedImage() : EncodedImage(nullptr, 0, 0) {} |
181 EncodedImage(uint8_t* buffer, size_t length, size_t size) | 181 EncodedImage(uint8_t* buffer, size_t length, size_t size) |
182 : _buffer(buffer), _length(length), _size(size) {} | 182 : _buffer(buffer), _length(length), _size(size) {} |
183 | 183 |
184 struct AdaptReason { | |
185 AdaptReason() | |
186 : quality_available(false), | |
187 quality_resolution_downscales(0) {} | |
188 | |
189 bool quality_available; // True if |quality_resolution_downscales| is | |
mflodman
2015/10/02 09:21:51
I don't fully understand this comment. Is it true
åsapersson
2015/10/06 11:26:39
It is true if we might downscale (the quality scal
mflodman
2015/10/07 11:18:58
Does it make sense to skip the bool and do somethi
åsapersson
2015/10/09 12:17:07
Done. Removed bool.
| |
190 // provided. | |
191 int quality_resolution_downscales; // Number of times this frame is down | |
192 // scaled in resolution due to quality. | |
193 }; | |
184 uint32_t _encodedWidth = 0; | 194 uint32_t _encodedWidth = 0; |
185 uint32_t _encodedHeight = 0; | 195 uint32_t _encodedHeight = 0; |
186 uint32_t _timeStamp = 0; | 196 uint32_t _timeStamp = 0; |
187 // NTP time of the capture time in local timebase in milliseconds. | 197 // NTP time of the capture time in local timebase in milliseconds. |
188 int64_t ntp_time_ms_ = 0; | 198 int64_t ntp_time_ms_ = 0; |
189 int64_t capture_time_ms_ = 0; | 199 int64_t capture_time_ms_ = 0; |
190 // TODO(pbos): Use webrtc::FrameType directly (and remove VideoFrameType). | 200 // TODO(pbos): Use webrtc::FrameType directly (and remove VideoFrameType). |
191 VideoFrameType _frameType = kDeltaFrame; | 201 VideoFrameType _frameType = kDeltaFrame; |
192 uint8_t* _buffer; | 202 uint8_t* _buffer; |
193 size_t _length; | 203 size_t _length; |
194 size_t _size; | 204 size_t _size; |
195 bool _completeFrame = false; | 205 bool _completeFrame = false; |
206 AdaptReason adapt_reason_; | |
196 }; | 207 }; |
197 | 208 |
198 } // namespace webrtc | 209 } // namespace webrtc |
199 #endif // WEBRTC_VIDEO_FRAME_H_ | 210 #endif // WEBRTC_VIDEO_FRAME_H_ |
OLD | NEW |