| 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 |
| 11 #include "webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h" | 11 #include "webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h" |
| 12 | 12 |
| 13 #include <algorithm> |
| 13 #include <cmath> | 14 #include <cmath> |
| 14 | 15 |
| 15 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
| 16 #include "webrtc/base/logging.h" | 17 #include "webrtc/base/logging.h" |
| 17 #include "webrtc/system_wrappers/include/field_trial.h" | 18 #include "webrtc/system_wrappers/include/field_trial.h" |
| 18 #include "webrtc/system_wrappers/include/metrics.h" | 19 #include "webrtc/system_wrappers/include/metrics.h" |
| 19 #include "webrtc/call/rtc_event_log.h" | 20 #include "webrtc/call/rtc_event_log.h" |
| 20 | 21 |
| 21 namespace webrtc { | 22 namespace webrtc { |
| 22 namespace { | 23 namespace { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 34 int bitrate_kbps; | 35 int bitrate_kbps; |
| 35 }; | 36 }; |
| 36 | 37 |
| 37 const UmaRampUpMetric kUmaRampupMetrics[] = { | 38 const UmaRampUpMetric kUmaRampupMetrics[] = { |
| 38 {"WebRTC.BWE.RampUpTimeTo500kbpsInMs", 500}, | 39 {"WebRTC.BWE.RampUpTimeTo500kbpsInMs", 500}, |
| 39 {"WebRTC.BWE.RampUpTimeTo1000kbpsInMs", 1000}, | 40 {"WebRTC.BWE.RampUpTimeTo1000kbpsInMs", 1000}, |
| 40 {"WebRTC.BWE.RampUpTimeTo2000kbpsInMs", 2000}}; | 41 {"WebRTC.BWE.RampUpTimeTo2000kbpsInMs", 2000}}; |
| 41 const size_t kNumUmaRampupMetrics = | 42 const size_t kNumUmaRampupMetrics = |
| 42 sizeof(kUmaRampupMetrics) / sizeof(kUmaRampupMetrics[0]); | 43 sizeof(kUmaRampupMetrics) / sizeof(kUmaRampupMetrics[0]); |
| 43 | 44 |
| 44 } | 45 } // namespace |
| 45 | 46 |
| 46 SendSideBandwidthEstimation::SendSideBandwidthEstimation() | 47 SendSideBandwidthEstimation::SendSideBandwidthEstimation() |
| 47 : lost_packets_since_last_loss_update_Q8_(0), | 48 : lost_packets_since_last_loss_update_Q8_(0), |
| 48 expected_packets_since_last_loss_update_(0), | 49 expected_packets_since_last_loss_update_(0), |
| 49 bitrate_(0), | 50 bitrate_(0), |
| 50 min_bitrate_configured_(kDefaultMinBitrateBps), | 51 min_bitrate_configured_(kDefaultMinBitrateBps), |
| 51 max_bitrate_configured_(kDefaultMaxBitrateBps), | 52 max_bitrate_configured_(kDefaultMaxBitrateBps), |
| 52 last_low_bitrate_log_ms_(-1), | 53 last_low_bitrate_log_ms_(-1), |
| 53 has_decreased_since_last_fraction_loss_(false), | 54 has_decreased_since_last_fraction_loss_(false), |
| 54 time_last_receiver_block_ms_(-1), | 55 time_last_receiver_block_ms_(-1), |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 bitrate = min_bitrate_configured_; | 299 bitrate = min_bitrate_configured_; |
| 299 } | 300 } |
| 300 return bitrate; | 301 return bitrate; |
| 301 } | 302 } |
| 302 | 303 |
| 303 void SendSideBandwidthEstimation::SetEventLog(RtcEventLog* event_log) { | 304 void SendSideBandwidthEstimation::SetEventLog(RtcEventLog* event_log) { |
| 304 event_log_ = event_log; | 305 event_log_ = event_log; |
| 305 } | 306 } |
| 306 | 307 |
| 307 } // namespace webrtc | 308 } // namespace webrtc |
| OLD | NEW |