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

Unified Diff: webrtc/modules/pacing/bitrate_prober.cc

Issue 2246403002: CongestionController::SetBweBitrates may now trigger probing. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Don't set probing state to active in the case of no clusters. Created 4 years, 4 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/modules/pacing/bitrate_prober.h ('k') | webrtc/modules/pacing/bitrate_prober_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/bitrate_prober.cc
diff --git a/webrtc/modules/pacing/bitrate_prober.cc b/webrtc/modules/pacing/bitrate_prober.cc
index 4b2a977bbebcdcab302e24c762e679ae0cd87d0e..e2cea7330589729552923e6cbfb7e343ef569e12 100644
--- a/webrtc/modules/pacing/bitrate_prober.cc
+++ b/webrtc/modules/pacing/bitrate_prober.cc
@@ -59,12 +59,13 @@ void BitrateProber::OnIncomingPacket(size_t packet_size) {
// Don't initialize probing unless we have something large enough to start
// probing.
if (probing_state_ == ProbingState::kInactive &&
+ !clusters_.empty() &&
packet_size >= PacedSender::kMinProbePacketSize) {
probing_state_ = ProbingState::kActive;
}
}
-void BitrateProber::ProbeAtBitrate(uint32_t bitrate_bps, int num_packets) {
+void BitrateProber::CreateProbeCluster(int bitrate_bps, int num_packets) {
ProbeCluster cluster;
cluster.max_probe_packets = num_packets;
cluster.probe_bitrate_bps = bitrate_bps;
@@ -85,8 +86,8 @@ void BitrateProber::ResetState() {
std::queue<ProbeCluster> clusters;
clusters.swap(clusters_);
while (!clusters.empty()) {
- ProbeAtBitrate(clusters.front().probe_bitrate_bps,
- clusters.front().max_probe_packets);
+ CreateProbeCluster(clusters.front().probe_bitrate_bps,
+ clusters.front().max_probe_packets);
clusters.pop();
}
// If its enabled, reset to inactive.
« no previous file with comments | « webrtc/modules/pacing/bitrate_prober.h ('k') | webrtc/modules/pacing/bitrate_prober_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698