| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 } else { | 223 } else { |
| 224 streams[s].temporal_layer_thresholds_bps.resize( | 224 streams[s].temporal_layer_thresholds_bps.resize( |
| 225 kDefaultConferenceNumberOfTemporalLayers[s] - 1); | 225 kDefaultConferenceNumberOfTemporalLayers[s] - 1); |
| 226 streams[s].max_bitrate_bps = FindSimulcastMaxBitrateBps(width, height); | 226 streams[s].max_bitrate_bps = FindSimulcastMaxBitrateBps(width, height); |
| 227 streams[s].target_bitrate_bps = | 227 streams[s].target_bitrate_bps = |
| 228 FindSimulcastTargetBitrateBps(width, height); | 228 FindSimulcastTargetBitrateBps(width, height); |
| 229 streams[s].min_bitrate_bps = FindSimulcastMinBitrateBps(width, height); | 229 streams[s].min_bitrate_bps = FindSimulcastMinBitrateBps(width, height); |
| 230 streams[s].max_framerate = max_framerate; | 230 streams[s].max_framerate = max_framerate; |
| 231 } | 231 } |
| 232 | 232 |
| 233 width /= 2; | 233 if (!is_screencast) { |
| 234 height /= 2; | 234 width /= 2; |
| 235 height /= 2; |
| 236 } |
| 235 if (s == 0) | 237 if (s == 0) |
| 236 break; | 238 break; |
| 237 } | 239 } |
| 238 | 240 |
| 239 // Spend additional bits to boost the max stream. | 241 // Spend additional bits to boost the max stream. |
| 240 int bitrate_left_bps = max_bitrate_bps - GetTotalMaxBitrateBps(streams); | 242 int bitrate_left_bps = max_bitrate_bps - GetTotalMaxBitrateBps(streams); |
| 241 if (bitrate_left_bps > 0) { | 243 if (bitrate_left_bps > 0) { |
| 242 streams.back().max_bitrate_bps += bitrate_left_bps; | 244 streams.back().max_bitrate_bps += bitrate_left_bps; |
| 243 } | 245 } |
| 244 | 246 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 | 297 |
| 296 return true; | 298 return true; |
| 297 } | 299 } |
| 298 | 300 |
| 299 bool UseSimulcastScreenshare() { | 301 bool UseSimulcastScreenshare() { |
| 300 return webrtc::field_trial::FindFullName( | 302 return webrtc::field_trial::FindFullName( |
| 301 kSimulcastScreenshareFieldTrialName) == "Enabled"; | 303 kSimulcastScreenshareFieldTrialName) == "Enabled"; |
| 302 } | 304 } |
| 303 | 305 |
| 304 } // namespace cricket | 306 } // namespace cricket |
| OLD | NEW |