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

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

Issue 2982233002: Added implementations for entering/exiting STARTUP, DRAIN, PROBE_BW, PROBE_RTT modes, also updated M (Closed)
Patch Set: Unittest fix 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/max_bandwidth_filter.h
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter.h b/webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter.h
index c873979573a50564634a2e1d5a77e3a056f905b0..6bb320f55acfacb64ae447dd17ad38253f44bccf 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter.h
@@ -12,8 +12,16 @@
#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_MAX_BANDWIDTH_FILTER_H_
#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_MAX_BANDWIDTH_FILTER_H_
-#include <cstddef>
-#include <cstdint>
+#include <climits>
+#include <list>
+#include <map>
+#include <memory>
+#include <utility>
+#include <vector>
+
+#include "webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h"
+#include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h"
+#include "webrtc/modules/remote_bitrate_estimator/test/bwe.h"
namespace webrtc {
namespace testing {
@@ -23,23 +31,20 @@ class MaxBandwidthFilter {
MaxBandwidthFilter();
~MaxBandwidthFilter();
- int64_t max_bandwidth_estimate_bytes_per_ms() {
- return max_bandwidth_estimate_bytes_per_ms_;
- }
+ int64_t max_bandwidth_estimate_bps() { return max_bandwidth_estimate_bps_; }
- // Save bandwidth sample for the current round. We save bandwidth samples for
- // past 10 rounds to provide better bandwidth estimate.
+ // Adds bandwidth sample to the bandwidth filter.
void AddBandwidthSample(int64_t sample, int64_t round, size_t filter_size);
- // Check if bandwidth has grown by certain multiplier for past x rounds,
- // to decide whether or not full bandwidth was reached.
+ // Checks if bandwidth has grown by certain multiplier for past x rounds,
+ // to decide whether or full bandwidth was reached.
bool FullBandwidthReached(float growth_target, int max_rounds_without_growth);
private:
int64_t bandwidth_last_round_bytes_per_ms_;
- uint64_t round_bandwidth_updated_;
- int64_t max_bandwidth_estimate_bytes_per_ms_;
+ int64_t max_bandwidth_estimate_bps_;
int64_t rounds_without_growth_;
+ std::pair<int64_t, size_t> bandwidth_samples_[3];
};
} // namespace bwe
} // namespace testing

Powered by Google App Engine
This is Rietveld 408576698