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 <climits> | |
16 #include <list> | |
17 #include <map> | |
18 #include <memory> | |
19 #include <utility> | |
20 #include <vector> | |
21 | |
22 #include "webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h" | |
23 #include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h" | |
24 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" | |
25 | |
26 namespace webrtc { | 15 namespace webrtc { |
27 namespace testing { | 16 namespace testing { |
28 namespace bwe { | 17 namespace bwe { |
29 class CongestionWindow { | 18 class CongestionWindow { |
30 public: | 19 public: |
31 void set_gain(float gain); | 20 void set_gain(float gain); |
32 size_t data_inflight(); | 21 size_t data_inflight(); |
33 int64_t GetCongestionWindow(); | 22 int64_t GetCongestionWindow(); |
34 | 23 |
35 // Packet sent from sender, meaning it is inflight | 24 // Packet sent from sender, meaning it is inflight |
36 // until we receive it and we should add packet's size to data_inflight. | 25 // until we receive it and we should add packet's size to data_inflight. |
37 void PacketSent(); | 26 void PacketSent(); |
38 | 27 |
39 // Ack was received by sender, meaning | 28 // Ack was received by sender, meaning |
40 // packet is no longer inflight. | 29 // packet is no longer inflight. |
41 void AckReceived(); | 30 void AckReceived(); |
42 | |
43 // Returnes whether or not data inflight has been under | |
44 // fixed value for past x rounds and y ms. | |
45 bool DataInflightDecreased(); | |
46 }; | 31 }; |
47 } // namespace bwe | 32 } // namespace bwe |
48 } // namespace testing | 33 } // namespace testing |
49 } // namespace webrtc | 34 } // namespace webrtc |
50 | 35 |
51 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WI
NDOW_H_ | 36 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WI
NDOW_H_ |
OLD | NEW |