Makes new congestion controller work with rtp sender tests.

Bug: webrtc:9586
Change-Id: Ifa12ef5d85b19395c62fc1001a107c4151927098
Reviewed-on: https://webrtc-review.googlesource.com/102160
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24871}
This commit is contained in:
Sebastian Jansson
2018-09-27 17:32:00 +02:00
committed by Commit Bot
parent 287cfdecab
commit dc8c981dcb
2 changed files with 30 additions and 5 deletions

View File

@ -368,6 +368,15 @@ SendSideCongestionController::SendSideCongestionController(
initial_config_.constraints = ConvertConstraints(
min_bitrate_bps, max_bitrate_bps, start_bitrate_bps, clock_);
RTC_DCHECK(start_bitrate_bps > 0);
// To be fully compatible with legacy SendSideCongestionController, make sure
// pacer is initialized even if there are no registered streams. This should
// not happen under normal circumstances, but some tests rely on it and there
// are no checks detecting when the legacy SendSideCongestionController is
// used. This way of setting the value has the drawback that it might be wrong
// compared to what the actual value from the congestion controller will be.
// TODO(srte): Remove this when the legacy SendSideCongestionController is
// removed.
pacer_->SetEstimatedBitrate(start_bitrate_bps);
}
// There is no point in having a network controller for a network that is not