Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1083)

Unified Diff: webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.h

Issue 2966403002: Added implementation of three classes in BBR,with unit-tests. (Closed)
Patch Set: Changed names of some variables. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.h
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.h b/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.h
index 887e096004294a17a2e8dd908d36243a10aaefe5..9e7f5784729f57cd2547b12366a3fee87928642a 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window.h
@@ -12,22 +12,33 @@
#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WINDOW_H_
#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_CONGESTION_WINDOW_H_
+#include "webrtc/modules/remote_bitrate_estimator/test/estimators/bbr.h"
+
namespace webrtc {
namespace testing {
namespace bwe {
class CongestionWindow {
public:
- void set_gain(float gain);
- size_t data_inflight();
- int64_t GetCongestionWindow();
+ CongestionWindow();
+ ~CongestionWindow();
+ int GetCongestionWindow(BbrBweSender::Mode mode,
+ int64_t bandwidth_estimate,
philipel 2017/07/12 13:03:35 Include unit when possible: bandwidth_estimate_bps
+ int64_t min_rtt,
philipel 2017/07/12 13:03:35 min_rtt_ms
+ float gain);
+ int GetTargetCongestionWindow(int64_t bandwidth_estimate,
+ int64_t min_rtt,
+ float gain);
+ // Packet sent from sender, meaning it is inflight until we receive it and we
+ // should add packet's size to data_inflight.
+ void PacketSent(size_t sent_packet_size);
+
+ // Ack was received by sender, meaning packet is no longer inflight.
+ void AckReceived(size_t received_packet_size);
- // Packet sent from sender, meaning it is inflight
- // until we receive it and we should add packet's size to data_inflight.
- void PacketSent();
+ size_t data_inflight() { return data_inflight_; }
- // Ack was received by sender, meaning
- // packet is no longer inflight.
- void AckReceived();
+ private:
+ size_t data_inflight_;
};
} // namespace bwe
} // namespace testing

Powered by Google App Engine
This is Rietveld 408576698