aboutsummaryrefslogtreecommitdiff
path: root/call/rampup_tests.cc
diff options
context:
space:
mode:
authorAlex Narest <alexnarest@webrtc.org>2017-10-18 18:31:07 +0200
committerCommit Bot <commit-bot@chromium.org>2017-10-19 09:30:00 +0000
commita5fbc23379823d74b8cf4bc18887ff40237989e8 (patch)
tree5d5cd9f0e14f6a0243fb65d0b1865f1a258542c0 /call/rampup_tests.cc
parent90d46c472d426faf9ec1ff161739cf7cda342442 (diff)
downloadwebrtc-a5fbc23379823d74b8cf4bc18887ff40237989e8.tar.gz
BWE allocation strategy
This is reland of https://webrtc-review.googlesource.com/c/src/+/4860 with the fixed RampUpTest test Bug: webrtc:8243 Change-Id: I4b90a449b00dd05feee974001e08fb40710b59ac Reviewed-on: https://webrtc-review.googlesource.com/13124 Commit-Queue: Alex Narest <alexnarest@webrtc.org> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20345}
Diffstat (limited to 'call/rampup_tests.cc')
-rw-r--r--call/rampup_tests.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/call/rampup_tests.cc b/call/rampup_tests.cc
index 85346b7479..1d584195d2 100644
--- a/call/rampup_tests.cc
+++ b/call/rampup_tests.cc
@@ -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));
}