| 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 29 matching lines...) Expand all  Loading... | 
| 40 constexpr int64_t kAlrPeriodicProbingIntervalMs = 5000; | 40 constexpr int64_t kAlrPeriodicProbingIntervalMs = 5000; | 
| 41 | 41 | 
| 42 // Minimum probe bitrate percentage to probe further for repeated probes, | 42 // Minimum probe bitrate percentage to probe further for repeated probes, | 
| 43 // relative to the previous probe. For example, if 1Mbps probe results in | 43 // relative to the previous probe. For example, if 1Mbps probe results in | 
| 44 // 80kbps, then we'll probe again at 1.6Mbps. In that case second probe won't be | 44 // 80kbps, then we'll probe again at 1.6Mbps. In that case second probe won't be | 
| 45 // sent if we get 600kbps from the first one. | 45 // sent if we get 600kbps from the first one. | 
| 46 constexpr int kRepeatedProbeMinPercentage = 70; | 46 constexpr int kRepeatedProbeMinPercentage = 70; | 
| 47 | 47 | 
| 48 }  // namespace | 48 }  // namespace | 
| 49 | 49 | 
| 50 ProbeController::ProbeController(PacedSender* pacer, Clock* clock) | 50 ProbeController::ProbeController(PacedSender* pacer, const Clock* clock) | 
| 51     : pacer_(pacer), clock_(clock), enable_periodic_alr_probing_(false) { | 51     : pacer_(pacer), clock_(clock), enable_periodic_alr_probing_(false) { | 
| 52   Reset(); | 52   Reset(); | 
| 53 } | 53 } | 
| 54 | 54 | 
| 55 void ProbeController::SetBitrates(int64_t min_bitrate_bps, | 55 void ProbeController::SetBitrates(int64_t min_bitrate_bps, | 
| 56                                   int64_t start_bitrate_bps, | 56                                   int64_t start_bitrate_bps, | 
| 57                                   int64_t max_bitrate_bps) { | 57                                   int64_t max_bitrate_bps) { | 
| 58   rtc::CritScope cs(&critsect_); | 58   rtc::CritScope cs(&critsect_); | 
| 59 | 59 | 
| 60   if (start_bitrate_bps > 0)  { | 60   if (start_bitrate_bps > 0)  { | 
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 240     state_ = State::kWaitingForProbingResult; | 240     state_ = State::kWaitingForProbingResult; | 
| 241     min_bitrate_to_probe_further_bps_ = | 241     min_bitrate_to_probe_further_bps_ = | 
| 242         (*(bitrates_to_probe.end() - 1)) * kRepeatedProbeMinPercentage / 100; | 242         (*(bitrates_to_probe.end() - 1)) * kRepeatedProbeMinPercentage / 100; | 
| 243   } else { | 243   } else { | 
| 244     state_ = State::kProbingComplete; | 244     state_ = State::kProbingComplete; | 
| 245     min_bitrate_to_probe_further_bps_ = kExponentialProbingDisabled; | 245     min_bitrate_to_probe_further_bps_ = kExponentialProbingDisabled; | 
| 246   } | 246   } | 
| 247 } | 247 } | 
| 248 | 248 | 
| 249 }  // namespace webrtc | 249 }  // namespace webrtc | 
| OLD | NEW | 
|---|