Chromium Code Reviews| Index: webrtc/media/base/videoadapter.h |
| diff --git a/webrtc/media/base/videoadapter.h b/webrtc/media/base/videoadapter.h |
| index 553c08577490c667a75a36b783a49c502eae09e8..e011411788102e1b441c38e97d6c41a39fe398e5 100644 |
| --- a/webrtc/media/base/videoadapter.h |
| +++ b/webrtc/media/base/videoadapter.h |
| @@ -48,11 +48,13 @@ class VideoAdapter { |
| // 720x1280 is requested. |
| void OnOutputFormatRequest(const VideoFormat& format); |
| - // Requests the output frame size from |AdaptFrameResolution| to not have |
| - // more than |max_pixel_count| pixels and have "one step" up more pixels than |
| - // max_pixel_count_step_up. |
| - void OnResolutionRequest(rtc::Optional<int> max_pixel_count, |
| - rtc::Optional<int> max_pixel_count_step_up); |
| + // Requests the output frame size from |AdaptFrameResolution| to have as close |
| + // as possible to |target_pixel_count|, but no more than |max_pixel_count| |
| + // pixels. If |target_pixel_count| is not set, treat it as being equal to |
| + // |max_pixel_count|. If |max_pixel_count| is not set, treat is as being the |
| + // highest resolution available. |
| + void OnResolutionRequest(rtc::Optional<int> target_pixel_count, |
| + rtc::Optional<int> max_pixel_count); |
|
kthelgason
2017/02/06 12:13:20
Maybe we should use this opportunity and change th
sprang_webrtc
2017/02/06 13:18:07
Since we're always gonna have an rtc::Optional in
|
| private: |
| // Determine if frame should be dropped based on input fps and requested fps. |
| @@ -73,8 +75,8 @@ class VideoAdapter { |
| // OnResolutionRequest respectively. |
| // The adapted output format is the minimum of these. |
| rtc::Optional<VideoFormat> requested_format_ GUARDED_BY(critical_section_); |
| + int resolution_request_target_pixel_count_ GUARDED_BY(critical_section_); |
| int resolution_request_max_pixel_count_ GUARDED_BY(critical_section_); |
| - bool step_up_ GUARDED_BY(critical_section_); |
| // The critical section to protect the above variables. |
| rtc::CriticalSection critical_section_; |