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

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

Issue 2861673006: Don't initiate perodic probing if we don't have a bandwidth estimate. (Closed)
Patch Set: Feedback Created 3 years, 7 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/congestion_controller/probe_controller_unittest.cc ('k') | no next file » | 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 e4de4a8dadc120c869b91dd4110ac887e34692e9..1f515bfb1a1a917c831f06e51e0e72aaca465f78 100644
--- a/webrtc/modules/pacing/bitrate_prober.cc
+++ b/webrtc/modules/pacing/bitrate_prober.cc
@@ -86,6 +86,7 @@ void BitrateProber::OnIncomingPacket(size_t packet_size) {
void BitrateProber::CreateProbeCluster(int bitrate_bps, int64_t now_ms) {
RTC_DCHECK(probing_state_ != ProbingState::kDisabled);
+ RTC_DCHECK_GT(bitrate_bps, 0);
while (!clusters_.empty() &&
now_ms - clusters_.front().time_created_ms > kProbeClusterTimeoutMs) {
clusters_.pop();
@@ -151,7 +152,7 @@ int BitrateProber::TimeUntilNextProbe(int64_t now_ms) {
PacedPacketInfo BitrateProber::CurrentCluster() const {
RTC_DCHECK(!clusters_.empty());
- RTC_DCHECK(ProbingState::kActive == probing_state_);
+ RTC_DCHECK(probing_state_ == ProbingState::kActive);
return clusters_.front().pace_info;
}
@@ -176,7 +177,7 @@ void BitrateProber::ProbeSent(int64_t now_ms, size_t bytes) {
}
cluster->sent_bytes += static_cast<int>(bytes);
cluster->sent_probes += 1;
- next_probe_time_ms_ = GetNextProbeTime(clusters_.front());
+ next_probe_time_ms_ = GetNextProbeTime(*cluster);
if (cluster->sent_bytes >= cluster->pace_info.probe_cluster_min_bytes &&
cluster->sent_probes >= cluster->pace_info.probe_cluster_min_probes) {
clusters_.pop();
« no previous file with comments | « webrtc/modules/congestion_controller/probe_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698