OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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 | 11 |
12 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WINDO W_H_ | 12 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WINDO W_H_ |
13 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WINDO W_H_ | 13 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WINDO W_H_ |
14 | 14 |
15 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/bbr.h" | |
16 | |
15 namespace webrtc { | 17 namespace webrtc { |
16 namespace testing { | 18 namespace testing { |
17 namespace bwe { | 19 namespace bwe { |
18 class CongestionWindow { | 20 class CongestionWindow { |
19 public: | 21 public: |
20 void set_gain(float gain); | 22 CongestionWindow(); |
21 size_t data_inflight(); | 23 ~CongestionWindow(); |
22 int64_t GetCongestionWindow(); | 24 int GetCongestionWindow(BbrBweSender::Mode mode, |
25 int64_t bandwidth_estimate, | |
26 int64_t min_rtt, | |
27 float gain, | |
terelius
2017/07/12 10:34:51
The difference between gain and multiplier is not
gnish1
2017/07/12 12:23:18
Done.
| |
28 size_t bytes_acked, | |
29 int multiplier); | |
30 int GetTargetCongestionWindow(int64_t bandwidth_estimate, | |
31 int64_t min_rtt, | |
32 float gain); | |
33 // Packet sent from sender, meaning it is inflight until we receive it and we | |
34 // should add packet's size to data_inflight. | |
35 void PacketSent(size_t sent_packet_size); | |
23 | 36 |
24 // Packet sent from sender, meaning it is inflight | 37 // Ack was received by sender, meaning packet is no longer inflight. |
25 // until we receive it and we should add packet's size to data_inflight. | 38 void AckReceived(size_t received_packet_size); |
26 void PacketSent(); | |
27 | 39 |
28 // Ack was received by sender, meaning | 40 size_t data_inflight() { return data_inflight_; } |
29 // packet is no longer inflight. | 41 |
30 void AckReceived(); | 42 private: |
43 size_t data_inflight_; | |
31 }; | 44 }; |
32 } // namespace bwe | 45 } // namespace bwe |
33 } // namespace testing | 46 } // namespace testing |
34 } // namespace webrtc | 47 } // namespace webrtc |
35 | 48 |
36 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WI NDOW_H_ | 49 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WI NDOW_H_ |
OLD | NEW |