Moving SetPacingFactor and allocation limits to SSCC.

This CL adds methods to the SendSideCongestionController (SSCC)
interface for configuring pacing factor and allocation based data rate limits.
This means that old SSCC implement the same interface as the new, task
queue based SSCC. This also allows merging the max total allocated
bit rate into SetAllocatedSendBitrateLimits.

This is done in preparation for an upcoming CL where the SSCC version
is controlled by a field trial.

Bug: webrtc:8415
Change-Id: I4d5446a3bedd5b0c725dbd009fb75815fd661eff
Reviewed-on: https://webrtc-review.googlesource.com/61320
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22408}
This commit is contained in:
Sebastian Jansson
2018-03-13 11:40:34 +01:00
committed by Commit Bot
parent ca8438b6bd
commit 68ee4653ef
6 changed files with 35 additions and 35 deletions

View File

@ -190,9 +190,12 @@ void SendSideCongestionController::SetBweBitrates(int min_bitrate_bps,
MaybeTriggerOnNetworkChanged();
}
void SendSideCongestionController::SetMaxTotalAllocatedBitrate(
int total_bitrate_bps) {
probe_controller_->OnMaxTotalAllocatedBitrate(total_bitrate_bps);
void SendSideCongestionController::SetAllocatedSendBitrateLimits(
int64_t min_send_bitrate_bps,
int64_t max_padding_bitrate_bps,
int64_t max_total_bitrate_bps) {
pacer_->SetSendBitrateLimits(min_send_bitrate_bps, max_padding_bitrate_bps);
probe_controller_->OnMaxTotalAllocatedBitrate(max_total_bitrate_bps);
}
// TODO(holmer): Split this up and use SetBweBitrates in combination with
@ -404,6 +407,10 @@ SendSideCongestionController::GetTransportFeedbackVector() const {
return transport_feedback_adapter_.GetTransportFeedbackVector();
}
void SendSideCongestionController::SetPacingFactor(float pacing_factor) {
pacer_->SetPacingFactor(pacing_factor);
}
void SendSideCongestionController::MaybeTriggerOnNetworkChanged() {
uint32_t bitrate_bps;
uint8_t fraction_loss;