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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 private: | 161 private: |
162 // An opaque reference counted handle that stores the pixel data. | 162 // An opaque reference counted handle that stores the pixel data. |
163 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_; | 163 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_; |
164 uint32_t timestamp_; | 164 uint32_t timestamp_; |
165 int64_t ntp_time_ms_; | 165 int64_t ntp_time_ms_; |
166 int64_t render_time_ms_; | 166 int64_t render_time_ms_; |
167 VideoRotation rotation_; | 167 VideoRotation rotation_; |
168 }; | 168 }; |
169 | 169 |
| 170 |
170 // TODO(pbos): Rename EncodedFrame and reformat this class' members. | 171 // TODO(pbos): Rename EncodedFrame and reformat this class' members. |
171 class EncodedImage { | 172 class EncodedImage { |
172 public: | 173 public: |
173 EncodedImage() : EncodedImage(nullptr, 0, 0) {} | 174 EncodedImage() : EncodedImage(nullptr, 0, 0) {} |
174 EncodedImage(uint8_t* buffer, size_t length, size_t size) | 175 EncodedImage(uint8_t* buffer, size_t length, size_t size) |
175 : _buffer(buffer), _length(length), _size(size) {} | 176 : _buffer(buffer), _length(length), _size(size) {} |
176 | 177 |
177 struct AdaptReason { | 178 struct AdaptReason { |
178 AdaptReason() | 179 AdaptReason() |
179 : quality_resolution_downscales(-1) {} | 180 : quality_resolution_downscales(-1), |
| 181 bw_resolutions_disabled(-1) {} |
180 | 182 |
181 int quality_resolution_downscales; // Number of times this frame is down | 183 int quality_resolution_downscales; // Number of times this frame is down |
182 // scaled in resolution due to quality. | 184 // scaled in resolution due to quality. |
183 // Or -1 if information is not provided. | 185 // Or -1 if information is not provided. |
| 186 int bw_resolutions_disabled; // Number of resolutions that are not sent |
| 187 // due to bandwidth for this frame. |
| 188 // Or -1 if information is not provided. |
184 }; | 189 }; |
185 uint32_t _encodedWidth = 0; | 190 uint32_t _encodedWidth = 0; |
186 uint32_t _encodedHeight = 0; | 191 uint32_t _encodedHeight = 0; |
187 uint32_t _timeStamp = 0; | 192 uint32_t _timeStamp = 0; |
188 // NTP time of the capture time in local timebase in milliseconds. | 193 // NTP time of the capture time in local timebase in milliseconds. |
189 int64_t ntp_time_ms_ = 0; | 194 int64_t ntp_time_ms_ = 0; |
190 int64_t capture_time_ms_ = 0; | 195 int64_t capture_time_ms_ = 0; |
191 FrameType _frameType = kDeltaFrame; | 196 FrameType _frameType = kDeltaFrame; |
192 uint8_t* _buffer; | 197 uint8_t* _buffer; |
193 size_t _length; | 198 size_t _length; |
194 size_t _size; | 199 size_t _size; |
195 bool _completeFrame = false; | 200 bool _completeFrame = false; |
196 AdaptReason adapt_reason_; | 201 AdaptReason adapt_reason_; |
197 }; | 202 }; |
198 | 203 |
199 } // namespace webrtc | 204 } // namespace webrtc |
200 #endif // WEBRTC_VIDEO_FRAME_H_ | 205 #endif // WEBRTC_VIDEO_FRAME_H_ |
OLD | NEW |