OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // Counters used for deciding if the video resolution is currently | 218 // Counters used for deciding if the video resolution is currently |
219 // restricted, and if so, why. | 219 // restricted, and if so, why. |
220 std::vector<int> scale_counter_ ACCESS_ON(&encoder_queue_); | 220 std::vector<int> scale_counter_ ACCESS_ON(&encoder_queue_); |
221 // Set depending on degradation preferences | 221 // Set depending on degradation preferences |
222 VideoSendStream::DegradationPreference degradation_preference_ | 222 VideoSendStream::DegradationPreference degradation_preference_ |
223 ACCESS_ON(&encoder_queue_); | 223 ACCESS_ON(&encoder_queue_); |
224 | 224 |
225 struct AdaptationRequest { | 225 struct AdaptationRequest { |
226 // The pixel count produced by the source at the time of the adaptation. | 226 // The pixel count produced by the source at the time of the adaptation. |
227 int input_pixel_count_; | 227 int input_pixel_count_; |
| 228 // Framerate received from the source at the time of the adaptation. |
| 229 int framerate_fps_; |
228 // Indicates if request was to adapt up or down. | 230 // Indicates if request was to adapt up or down. |
229 enum class Mode { kAdaptUp, kAdaptDown } mode_; | 231 enum class Mode { kAdaptUp, kAdaptDown } mode_; |
230 }; | 232 }; |
231 // Stores a snapshot of the last adaptation request triggered by an AdaptUp | 233 // Stores a snapshot of the last adaptation request triggered by an AdaptUp |
232 // or AdaptDown signal. | 234 // or AdaptDown signal. |
233 rtc::Optional<AdaptationRequest> last_adaptation_request_ | 235 rtc::Optional<AdaptationRequest> last_adaptation_request_ |
234 ACCESS_ON(&encoder_queue_); | 236 ACCESS_ON(&encoder_queue_); |
235 | 237 |
236 rtc::RaceChecker incoming_frame_race_checker_ | 238 rtc::RaceChecker incoming_frame_race_checker_ |
237 GUARDED_BY(incoming_frame_race_checker_); | 239 GUARDED_BY(incoming_frame_race_checker_); |
(...skipping 13 matching lines...) Expand all Loading... |
251 // All public methods are proxied to |encoder_queue_|. It must must be | 253 // All public methods are proxied to |encoder_queue_|. It must must be |
252 // destroyed first to make sure no tasks are run that use other members. | 254 // destroyed first to make sure no tasks are run that use other members. |
253 rtc::TaskQueue encoder_queue_; | 255 rtc::TaskQueue encoder_queue_; |
254 | 256 |
255 RTC_DISALLOW_COPY_AND_ASSIGN(ViEEncoder); | 257 RTC_DISALLOW_COPY_AND_ASSIGN(ViEEncoder); |
256 }; | 258 }; |
257 | 259 |
258 } // namespace webrtc | 260 } // namespace webrtc |
259 | 261 |
260 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_ | 262 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_ |
OLD | NEW |