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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // Detect a drop in estimated BW when operating in ALR and not already | 157 // Detect a drop in estimated BW when operating in ALR and not already |
158 // probing. The current response is to initiate a single probe session at the | 158 // probing. The current response is to initiate a single probe session at the |
159 // previous bitrate and immediately use the reported bitrate as the new | 159 // previous bitrate and immediately use the reported bitrate as the new |
160 // bitrate. | 160 // bitrate. |
161 // | 161 // |
162 // If the probe session fails, the assumption is that this drop was a | 162 // If the probe session fails, the assumption is that this drop was a |
163 // real one from a competing flow or something else on the network and | 163 // real one from a competing flow or something else on the network and |
164 // it ramps up from bitrate_bps. | 164 // it ramps up from bitrate_bps. |
165 if (state_ == State::kProbingComplete && | 165 if (state_ == State::kProbingComplete && |
166 pacer_->GetApplicationLimitedRegionStartTime() && | 166 pacer_->GetApplicationLimitedRegionStartTime() && |
167 bitrate_bps < estimated_bitrate_bps_ / 2 && | 167 bitrate_bps < 2 * estimated_bitrate_bps_ / 3 && |
168 (now_ms - last_alr_probing_time_) > kAlrProbingIntervalMinMs) { | 168 (now_ms - last_alr_probing_time_) > kAlrProbingIntervalMinMs) { |
169 LOG(LS_INFO) << "Detected big BW drop in ALR, start probe."; | 169 LOG(LS_INFO) << "Detected big BW drop in ALR, start probe."; |
170 // Track how often we probe in response to BW drop in ALR. | 170 // Track how often we probe in response to BW drop in ALR. |
171 RTC_HISTOGRAM_COUNTS_10000("WebRTC.BWE.AlrProbingIntervalInS", | 171 RTC_HISTOGRAM_COUNTS_10000("WebRTC.BWE.AlrProbingIntervalInS", |
172 (now_ms - last_alr_probing_time_) / 1000); | 172 (now_ms - last_alr_probing_time_) / 1000); |
173 InitiateProbing(now_ms, {estimated_bitrate_bps_}, false); | 173 InitiateProbing(now_ms, {estimated_bitrate_bps_}, false); |
174 last_alr_probing_time_ = now_ms; | 174 last_alr_probing_time_ = now_ms; |
175 | 175 |
176 // TODO(isheriff): May want to track when we did ALR probing in order | 176 // TODO(isheriff): May want to track when we did ALR probing in order |
177 // to reset |last_alr_probing_time_| if we validate that it was a | 177 // to reset |last_alr_probing_time_| if we validate that it was a |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |