#include "common_video/include/bitrate_adjuster.h"
#include <algorithm>
#include <cmath>
#include "rtc_base/logging.h"
#include "rtc_base/time_utils.h"
namespace webrtc {
const uint32_t BitrateAdjuster::kBitrateUpdateIntervalMs = …;
const uint32_t BitrateAdjuster::kBitrateUpdateFrameInterval = …;
const float BitrateAdjuster::kBitrateTolerancePct = …;
const float BitrateAdjuster::kBytesPerMsToBitsPerSecond = …;
BitrateAdjuster::BitrateAdjuster(float min_adjusted_bitrate_pct,
float max_adjusted_bitrate_pct)
: … { … }
void BitrateAdjuster::SetTargetBitrateBps(uint32_t bitrate_bps) { … }
uint32_t BitrateAdjuster::GetTargetBitrateBps() const { … }
uint32_t BitrateAdjuster::GetAdjustedBitrateBps() const { … }
absl::optional<uint32_t> BitrateAdjuster::GetEstimatedBitrateBps() { … }
void BitrateAdjuster::Update(size_t frame_size) { … }
bool BitrateAdjuster::IsWithinTolerance(uint32_t bitrate_bps,
uint32_t target_bitrate_bps) { … }
uint32_t BitrateAdjuster::GetMinAdjustedBitrateBps() const { … }
uint32_t BitrateAdjuster::GetMaxAdjustedBitrateBps() const { … }
void BitrateAdjuster::Reset() { … }
void BitrateAdjuster::UpdateBitrate(uint32_t current_time_ms) { … }
}