OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 lost_packets_since_last_loss_update_Q8_ = 0; | 279 lost_packets_since_last_loss_update_Q8_ = 0; |
280 expected_packets_since_last_loss_update_ = 0; | 280 expected_packets_since_last_loss_update_ = 0; |
281 last_timeout_ms_ = now_ms; | 281 last_timeout_ms_ = now_ms; |
282 } | 282 } |
283 } | 283 } |
284 uint32_t capped_bitrate = CapBitrateToThresholds(now_ms, bitrate_); | 284 uint32_t capped_bitrate = CapBitrateToThresholds(now_ms, bitrate_); |
285 if (capped_bitrate != bitrate_ || | 285 if (capped_bitrate != bitrate_ || |
286 last_fraction_loss_ != last_logged_fraction_loss_ || | 286 last_fraction_loss_ != last_logged_fraction_loss_ || |
287 last_rtc_event_log_ms_ == -1 || | 287 last_rtc_event_log_ms_ == -1 || |
288 now_ms - last_rtc_event_log_ms_ > kRtcEventLogPeriodMs) { | 288 now_ms - last_rtc_event_log_ms_ > kRtcEventLogPeriodMs) { |
289 event_log_->LogBwePacketLossEvent(capped_bitrate, last_fraction_loss_, | 289 event_log_->LogLossBasedBweUpdate(capped_bitrate, last_fraction_loss_, |
290 expected_packets_since_last_loss_update_); | 290 expected_packets_since_last_loss_update_); |
291 last_logged_fraction_loss_ = last_fraction_loss_; | 291 last_logged_fraction_loss_ = last_fraction_loss_; |
292 last_rtc_event_log_ms_ = now_ms; | 292 last_rtc_event_log_ms_ = now_ms; |
293 } | 293 } |
294 bitrate_ = capped_bitrate; | 294 bitrate_ = capped_bitrate; |
295 } | 295 } |
296 | 296 |
297 bool SendSideBandwidthEstimation::IsInStartPhase(int64_t now_ms) const { | 297 bool SendSideBandwidthEstimation::IsInStartPhase(int64_t now_ms) const { |
298 return first_report_time_ms_ == -1 || | 298 return first_report_time_ms_ == -1 || |
299 now_ms - first_report_time_ms_ < kStartPhaseMs; | 299 now_ms - first_report_time_ms_ < kStartPhaseMs; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 LOG(LS_WARNING) << "Estimated available bandwidth " << bitrate / 1000 | 336 LOG(LS_WARNING) << "Estimated available bandwidth " << bitrate / 1000 |
337 << " kbps is below configured min bitrate " | 337 << " kbps is below configured min bitrate " |
338 << min_bitrate_configured_ / 1000 << " kbps."; | 338 << min_bitrate_configured_ / 1000 << " kbps."; |
339 last_low_bitrate_log_ms_ = now_ms; | 339 last_low_bitrate_log_ms_ = now_ms; |
340 } | 340 } |
341 bitrate = min_bitrate_configured_; | 341 bitrate = min_bitrate_configured_; |
342 } | 342 } |
343 return bitrate; | 343 return bitrate; |
344 } | 344 } |
345 } // namespace webrtc | 345 } // namespace webrtc |
OLD | NEW |