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