#include "video/encoder_bitrate_adjuster.h"
#include <algorithm>
#include <memory>
#include <vector>
#include "api/field_trials_view.h"
#include "modules/video_coding/svc/scalability_mode_util.h"
#include "rtc_base/experiments/rate_control_settings.h"
#include "rtc_base/logging.h"
#include "rtc_base/time_utils.h"
namespace webrtc {
namespace {
struct LayerRateInfo { … };
}
constexpr TimeDelta EncoderBitrateAdjuster::kWindowSize;
constexpr size_t EncoderBitrateAdjuster::kMinFramesSinceLayoutChange;
constexpr double EncoderBitrateAdjuster::kDefaultUtilizationFactor;
EncoderBitrateAdjuster::EncoderBitrateAdjuster(
const VideoCodec& codec_settings,
const FieldTrialsView& field_trials,
Clock& clock)
: … { … }
EncoderBitrateAdjuster::~EncoderBitrateAdjuster() = default;
VideoBitrateAllocation EncoderBitrateAdjuster::AdjustRateAllocation(
const VideoEncoder::RateControlParameters& rates) { … }
void EncoderBitrateAdjuster::OnEncoderInfo(
const VideoEncoder::EncoderInfo& encoder_info) { … }
void EncoderBitrateAdjuster::OnEncodedFrame(DataSize size,
int stream_index,
int temporal_index) { … }
void EncoderBitrateAdjuster::Reset() { … }
}