OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 25 matching lines...) Expand all Loading... |
36 : BweReceiver(flow_id), | 36 : BweReceiver(flow_id), |
37 clock_(0), | 37 clock_(0), |
38 last_feedback_ms_(0), | 38 last_feedback_ms_(0), |
39 recv_stats_(ReceiveStatistics::Create(&clock_)), | 39 recv_stats_(ReceiveStatistics::Create(&clock_)), |
40 baseline_delay_ms_(0), | 40 baseline_delay_ms_(0), |
41 delay_signal_ms_(0), | 41 delay_signal_ms_(0), |
42 last_congestion_signal_ms_(0), | 42 last_congestion_signal_ms_(0), |
43 last_delays_index_(0), | 43 last_delays_index_(0), |
44 exp_smoothed_delay_ms_(-1), | 44 exp_smoothed_delay_ms_(-1), |
45 est_queuing_delay_signal_ms_(0) { | 45 est_queuing_delay_signal_ms_(0) { |
| 46 rate_counter_.set_windows_size_ms(kReceivingRateTimeWindowMs); |
46 } | 47 } |
47 | 48 |
48 NadaBweReceiver::~NadaBweReceiver() { | 49 NadaBweReceiver::~NadaBweReceiver() { |
49 } | 50 } |
50 | 51 |
51 void NadaBweReceiver::ReceivePacket(int64_t arrival_time_ms, | 52 void NadaBweReceiver::ReceivePacket(int64_t arrival_time_ms, |
52 const MediaPacket& media_packet) { | 53 const MediaPacket& media_packet) { |
53 const float kAlpha = 0.1f; // Used for exponential smoothing. | 54 const float kAlpha = 0.1f; // Used for exponential smoothing. |
54 const int64_t kDelayLowThresholdMs = 50; // Referred as d_th. | 55 const int64_t kDelayLowThresholdMs = 50; // Referred as d_th. |
55 const int64_t kDelayMaxThresholdMs = 400; // Referred as d_max. | 56 const int64_t kDelayMaxThresholdMs = 400; // Referred as d_max. |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 (kTheta - (bitrate_kbps_ - kMinRefRateKbps) * x_hat)) / | 319 (kTheta - (bitrate_kbps_ - kMinRefRateKbps) * x_hat)) / |
319 (kTauOMs * kTauOMs) + | 320 (kTauOMs * kTauOMs) + |
320 0.5f); | 321 0.5f); |
321 | 322 |
322 bitrate_kbps_ = bitrate_kbps_ + smoothing_factor * original_increase; | 323 bitrate_kbps_ = bitrate_kbps_ + smoothing_factor * original_increase; |
323 } | 324 } |
324 | 325 |
325 } // namespace bwe | 326 } // namespace bwe |
326 } // namespace testing | 327 } // namespace testing |
327 } // namespace webrtc | 328 } // namespace webrtc |
OLD | NEW |