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, | |
philipel
2017/07/12 13:03:35
Include unit when possible:
bandwidth_estimate_bps
| |
26 int64_t min_rtt, | |
philipel
2017/07/12 13:03:35
min_rtt_ms
| |
27 float gain); | |
28 int GetTargetCongestionWindow(int64_t bandwidth_estimate, | |
29 int64_t min_rtt, | |
30 float gain); | |
31 // Packet sent from sender, meaning it is inflight until we receive it and we | |
32 // should add packet's size to data_inflight. | |
33 void PacketSent(size_t sent_packet_size); | |
23 | 34 |
24 // Packet sent from sender, meaning it is inflight | 35 // 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. | 36 void AckReceived(size_t received_packet_size); |
26 void PacketSent(); | |
27 | 37 |
28 // Ack was received by sender, meaning | 38 size_t data_inflight() { return data_inflight_; } |
29 // packet is no longer inflight. | 39 |
30 void AckReceived(); | 40 private: |
41 size_t data_inflight_; | |
31 }; | 42 }; |
32 } // namespace bwe | 43 } // namespace bwe |
33 } // namespace testing | 44 } // namespace testing |
34 } // namespace webrtc | 45 } // namespace webrtc |
35 | 46 |
36 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WI NDOW_H_ | 47 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WI NDOW_H_ |
OLD | NEW |