Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: webrtc/call/call.cc

Issue 2035383002: Implementing auto pausing of video streams. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed comment. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/call/bitrate_allocator_unittest.cc ('k') | webrtc/call/rampup_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/call.cc
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc
index e3c6ec7a0ccb5443e69dabb02dcb11f39f2460e0..0ac5a0f1e11c26f867b7127da1230733e352746d 100644
--- a/webrtc/call/call.cc
+++ b/webrtc/call/call.cc
@@ -10,6 +10,7 @@
#include <string.h>
+#include <algorithm>
#include <map>
#include <memory>
#include <vector>
@@ -700,6 +701,10 @@ void Call::OnNetworkChanged(uint32_t target_bitrate_bps, uint8_t fraction_loss,
pacer_bitrate_sum_kbits_ += pacer_bitrate_bps / 1000;
++num_bitrate_updates_;
}
+
+ // Make sure to not ask for more padding than the current BWE allows for.
+ pad_up_to_bitrate_bps = std::min(static_cast<uint32_t>(pad_up_to_bitrate_bps),
+ target_bitrate_bps);
congestion_controller_->SetAllocatedSendBitrate(allocated_bitrate_bps,
pad_up_to_bitrate_bps);
}
« no previous file with comments | « webrtc/call/bitrate_allocator_unittest.cc ('k') | webrtc/call/rampup_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698