#include "modules/congestion_controller/goog_cc/bitrate_estimator.h"
#include <algorithm>
#include <cmath>
#include <cstdint>
#include "absl/types/optional.h"
#include "api/field_trials_view.h"
#include "api/units/data_rate.h"
#include "api/units/data_size.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
#include "rtc_base/checks.h"
#include "rtc_base/experiments/field_trial_parser.h"
namespace webrtc {
namespace {
constexpr int kInitialRateWindowMs = …;
constexpr int kRateWindowMs = …;
constexpr int kMinRateWindowMs = …;
constexpr int kMaxRateWindowMs = …;
const char kBweThroughputWindowConfig[] = …;
}
BitrateEstimator::BitrateEstimator(const FieldTrialsView* key_value_config)
: … { … }
BitrateEstimator::~BitrateEstimator() = default;
void BitrateEstimator::Update(Timestamp at_time, DataSize amount, bool in_alr) { … }
float BitrateEstimator::UpdateWindow(int64_t now_ms,
int bytes,
int rate_window_ms,
bool* is_small_sample) { … }
absl::optional<DataRate> BitrateEstimator::bitrate() const { … }
absl::optional<DataRate> BitrateEstimator::PeekRate() const { … }
void BitrateEstimator::ExpectFastRateChange() { … }
}