Chromium Code Reviews| Index: webrtc/media/base/videobroadcaster.cc |
| diff --git a/webrtc/media/base/videobroadcaster.cc b/webrtc/media/base/videobroadcaster.cc |
| index 6655d9365631a690627b7d3fd9dbc55a7e9a3ec5..85494a4e9e810b002b55cbfc803963e417cb838a 100644 |
| --- a/webrtc/media/base/videobroadcaster.cc |
| +++ b/webrtc/media/base/videobroadcaster.cc |
| @@ -89,18 +89,18 @@ void VideoBroadcaster::UpdateWants() { |
| (*sink.wants.max_pixel_count < *wants.max_pixel_count))) { |
| wants.max_pixel_count = sink.wants.max_pixel_count; |
| } |
| - // wants.max_pixel_count_step_up == MIN(sink.wants.max_pixel_count_step_up) |
| - if (sink.wants.max_pixel_count_step_up && |
| - (!wants.max_pixel_count_step_up || |
| - (*sink.wants.max_pixel_count_step_up < |
| - *wants.max_pixel_count_step_up))) { |
| - wants.max_pixel_count_step_up = sink.wants.max_pixel_count_step_up; |
| + // Select the minimum requested target_pixel_count, if any, of all sinks so |
|
nisse-webrtc
2017/02/06 08:43:19
Sinks could use max_pixel_count to express a limit
sprang_webrtc
2017/02/06 10:34:02
I wasn't aware of the full context of this behavio
|
| + // that we don't over utilize the resources for any one. |
| + if (sink.wants.target_pixel_count && |
| + (!wants.target_pixel_count || |
| + (*sink.wants.target_pixel_count < *wants.target_pixel_count))) { |
| + wants.target_pixel_count = sink.wants.target_pixel_count; |
| } |
| } |
| - if (wants.max_pixel_count && wants.max_pixel_count_step_up && |
| - *wants.max_pixel_count_step_up >= *wants.max_pixel_count) { |
| - wants.max_pixel_count_step_up = Optional<int>(); |
| + if (wants.max_pixel_count && wants.target_pixel_count && |
| + *wants.target_pixel_count >= *wants.max_pixel_count) { |
| + wants.target_pixel_count = wants.max_pixel_count; |
| } |
| current_wants_ = wants; |
| } |