Reland of BWE allocation strategy

TBR=stefan@webrtc.org,alexnarest@webrtc.org

Bug: webrtc:8243
Change-Id: Ie68e4f414b2ac32ba4e64877cb250fabcb089a07
Reviewed-on: https://webrtc-review.googlesource.com/13940
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Alex Narest <alexnarest@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20369}
This commit is contained in:
Alex Narest
2017-10-20 10:37:47 +02:00
committed by Commit Bot
parent b82de30080
commit 78609d5b6b
31 changed files with 543 additions and 24 deletions

View File

@ -418,19 +418,21 @@ RampUpDownUpTester::~RampUpDownUpTester() {}
void RampUpDownUpTester::PollStats() {
do {
if (send_stream_) {
int transmit_bitrate_bps = 0;
bool suspended = false;
if (num_video_streams_ > 0) {
webrtc::VideoSendStream::Stats stats = send_stream_->GetStats();
int transmit_bitrate_bps = 0;
for (auto it : stats.substreams) {
transmit_bitrate_bps += it.second.total_bitrate_bps;
}
EvolveTestState(transmit_bitrate_bps, stats.suspended);
} else if (num_audio_streams_ > 0 && sender_call_ != nullptr) {
suspended = stats.suspended;
}
if (num_audio_streams_ > 0 && sender_call_ != nullptr) {
// An audio send stream doesn't have bitrate stats, so the call send BW is
// currently used instead.
int transmit_bitrate_bps = sender_call_->GetStats().send_bandwidth_bps;
EvolveTestState(transmit_bitrate_bps, false);
transmit_bitrate_bps = sender_call_->GetStats().send_bandwidth_bps;
}
EvolveTestState(transmit_bitrate_bps, suspended);
} while (!stop_event_.Wait(kPollIntervalMs));
}