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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 double smoothing_factor); | 82 double smoothing_factor); |
83 | 83 |
84 int bitrate_kbps() const { return bitrate_kbps_; } | 84 int bitrate_kbps() const { return bitrate_kbps_; } |
85 void set_bitrate_kbps(int bitrate_kbps) { bitrate_kbps_ = bitrate_kbps; } | 85 void set_bitrate_kbps(int bitrate_kbps) { bitrate_kbps_ = bitrate_kbps; } |
86 bool original_operating_mode() const { return original_operating_mode_; } | 86 bool original_operating_mode() const { return original_operating_mode_; } |
87 void set_original_operating_mode(bool original_operating_mode) { | 87 void set_original_operating_mode(bool original_operating_mode) { |
88 original_operating_mode_ = original_operating_mode; | 88 original_operating_mode_ = original_operating_mode; |
89 } | 89 } |
90 int64_t NowMs() const { return clock_->TimeInMilliseconds(); } | 90 int64_t NowMs() const { return clock_->TimeInMilliseconds(); } |
91 | 91 |
92 static const int kMinRefRateKbps = 150; // Referred as R_min. | |
93 static const int kMaxRefRateKbps = 1500; // Referred as R_max. | |
94 | |
95 private: | 92 private: |
96 Clock* const clock_; | 93 Clock* const clock_; |
97 BitrateObserver* const observer_; | 94 BitrateObserver* const observer_; |
98 // Used as an upper bound for calling AcceleratedRampDown. | 95 // Used as an upper bound for calling AcceleratedRampDown. |
99 const float kMaxCongestionSignalMs = 40.0f + kMinRefRateKbps / 15; | 96 const float kMaxCongestionSignalMs = 40.0f + kMinBitrateKbps / 15; |
100 // Referred as R_min, default initialization for bitrate R_n. | 97 // Referred as R_min, default initialization for bitrate R_n. |
101 int bitrate_kbps_; // Referred as "Reference Rate" = R_n. | |
102 int64_t last_feedback_ms_ = 0; | 98 int64_t last_feedback_ms_ = 0; |
103 // Referred as delta_0, initialized as an upper bound. | 99 // Referred as delta_0, initialized as an upper bound. |
104 int64_t min_feedback_delay_ms_ = 200; | 100 int64_t min_feedback_delay_ms_ = 200; |
105 // Referred as RTT_0, initialized as an upper bound. | 101 // Referred as RTT_0, initialized as an upper bound. |
106 int64_t min_round_trip_time_ms_ = 100; | 102 int64_t min_round_trip_time_ms_ = 100; |
107 bool original_operating_mode_; | 103 bool original_operating_mode_; |
108 | 104 |
109 DISALLOW_IMPLICIT_CONSTRUCTORS(NadaBweSender); | 105 DISALLOW_IMPLICIT_CONSTRUCTORS(NadaBweSender); |
110 }; | 106 }; |
111 | 107 |
112 } // namespace bwe | 108 } // namespace bwe |
113 } // namespace testing | 109 } // namespace testing |
114 } // namespace webrtc | 110 } // namespace webrtc |
115 | 111 |
116 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_NADA_H_ | 112 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_NADA_H_ |
OLD | NEW |