| Index: webrtc/modules/remote_bitrate_estimator/test/estimators/stats.h
|
| diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/stats.h b/webrtc/modules/remote_bitrate_estimator/test/estimators/stats.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4f48d2aebdc3d4ab346efaef96f478d134859658
|
| --- /dev/null
|
| +++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/stats.h
|
| @@ -0,0 +1,83 @@
|
| +/*
|
| + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license
|
| + * that can be found in the LICENSE file in the root of the source
|
| + * tree. An additional intellectual property rights grant can be found
|
| + * in the file PATENTS. All contributing project authors may
|
| + * be found in the AUTHORS file in the root of the source tree.
|
| + *
|
| + */
|
| +
|
| +#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_STATS_H_
|
| +#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_STATS_H_
|
| +
|
| +namespace webrtc {
|
| +namespace testing {
|
| +namespace bwe {
|
| +class ConnectionState {
|
| + public:
|
| + ConnectionState();
|
| + virtual ~ConnectionState();
|
| +
|
| + int64_t time_min_cwnd_started() { return time_min_cwnd_started_; }
|
| + int64_t cwnd() { return cwnd_; }
|
| + void set_cwnd(int cwnd) { cwnd_ = cwnd; }
|
| + int64_t secondary_cwnd() { return secondary_cwnd_; }
|
| + void set_secondary_cwnd(int64_t secondary_cwnd) {
|
| + secondary_cwnd_ = secondary_cwnd;
|
| + }
|
| + bool DeliveryRateGrows();
|
| + int64_t pacing_rate() { return pacing_rate_; }
|
| + void set_pacing_rate(int pacing_rate) { pacing_rate_ = pacing_rate; }
|
| + int64_t min_rtt() { return min_rtt_; }
|
| + void set_min_rtt(int64_t min_rtt) { min_rtt_ = min_rtt; }
|
| + void set_min_rtt_time(int64_t min_rtt_time) { min_rtt_time_ = min_rtt_time; }
|
| + int64_t min_rtt_time() { return min_rtt_time_; }
|
| + void UpdateMinRtt(int64_t rtt);
|
| + int64_t GetTargetCwnd();
|
| + void set_bdp(int64_t bdp) { bdp_ = bdp; }
|
| + int64_t max_bdw() { return max_bdw_; }
|
| + int64_t delivered() { return delivered_; }
|
| + void AddDelivered(int64_t payload);
|
| + int64_t delivered_time() { return delivered_time_; }
|
| + void set_delivered_time(int64_t delivered_time) {
|
| + delivered_time_ = delivered_time;
|
| + }
|
| + void set_delivery_rate(int64_t delivery_rate) {
|
| + delivery_rate_ = delivery_rate;
|
| + }
|
| + void set_pacing_gain(float pacing_gain) { pacing_gain_ = pacing_gain; }
|
| + int64_t bytes_acked() { return bytes_acked_; }
|
| + int64_t inflight() { return inflight_; }
|
| + void AddBandwidth(int64_t bandwidth);
|
| + void set_cycle_start_time(int64_t cycle_start_time);
|
| + int64_t cycle_start_time();
|
| + void set_cycle_index(int64_t cycle_index);
|
| + int64_t cycle_index();
|
| + bool PacketsInFlightHasDecreased(int64_t target_value);
|
| + void CalculatePacingRate();
|
| + void CalculateCongestionWindow();
|
| +
|
| + private:
|
| + int64_t last_min_rtt_evaluation_time_;
|
| + int64_t time_min_cwnd_started_;
|
| + int64_t cwnd_;
|
| + int64_t secondary_cwnd_;
|
| + int64_t pacing_rate_;
|
| + int64_t max_bdw_;
|
| + int64_t min_rtt_;
|
| + int64_t bdp_;
|
| + int64_t delivered_;
|
| + int64_t delivered_time_;
|
| + int64_t delivery_rate_;
|
| + int64_t bytes_acked_;
|
| + int64_t min_rtt_time_;
|
| + float pacing_gain_;
|
| + int64_t inflight_;
|
| +};
|
| +} // namespace bwe
|
| +} // namespace testing
|
| +} // namespace webrtc
|
| +
|
| +#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_STATS_H_
|
|
|