OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 int64_t now_ms, | 222 int64_t now_ms, |
223 std::initializer_list<int64_t> bitrates_to_probe, | 223 std::initializer_list<int64_t> bitrates_to_probe, |
224 bool probe_further) { | 224 bool probe_further) { |
225 for (int64_t bitrate : bitrates_to_probe) { | 225 for (int64_t bitrate : bitrates_to_probe) { |
226 int64_t max_probe_bitrate_bps = | 226 int64_t max_probe_bitrate_bps = |
227 max_bitrate_bps_ > 0 ? max_bitrate_bps_ : kDefaultMaxProbingBitrateBps; | 227 max_bitrate_bps_ > 0 ? max_bitrate_bps_ : kDefaultMaxProbingBitrateBps; |
228 if (bitrate > max_probe_bitrate_bps) { | 228 if (bitrate > max_probe_bitrate_bps) { |
229 bitrate = max_probe_bitrate_bps; | 229 bitrate = max_probe_bitrate_bps; |
230 probe_further = false; | 230 probe_further = false; |
231 } | 231 } |
232 pacer_->CreateProbeCluster(rtc::checked_cast<int>(bitrate)); | 232 pacer_->CreateProbeCluster(rtc::dchecked_cast<int>(bitrate)); |
233 } | 233 } |
234 time_last_probing_initiated_ms_ = now_ms; | 234 time_last_probing_initiated_ms_ = now_ms; |
235 if (probe_further) { | 235 if (probe_further) { |
236 state_ = State::kWaitingForProbingResult; | 236 state_ = State::kWaitingForProbingResult; |
237 min_bitrate_to_probe_further_bps_ = | 237 min_bitrate_to_probe_further_bps_ = |
238 (*(bitrates_to_probe.end() - 1)) * kRepeatedProbeMinPercentage / 100; | 238 (*(bitrates_to_probe.end() - 1)) * kRepeatedProbeMinPercentage / 100; |
239 } else { | 239 } else { |
240 state_ = State::kProbingComplete; | 240 state_ = State::kProbingComplete; |
241 min_bitrate_to_probe_further_bps_ = kExponentialProbingDisabled; | 241 min_bitrate_to_probe_further_bps_ = kExponentialProbingDisabled; |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
245 } // namespace webrtc | 245 } // namespace webrtc |
OLD | NEW |