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

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

Issue 1962303002: Added cluster id to PacedSender::Callback::TimeToSendPacket. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addded probing cluster unittest. Created 4 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/pacing/bitrate_prober.h ('k') | webrtc/modules/pacing/paced_sender.h » ('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 db42666dc6b89f67ad77363074f85fb0332faf2f..8e8e36ea34be202017e81ff584bb9ec7b26e9079 100644
--- a/webrtc/modules/pacing/bitrate_prober.cc
+++ b/webrtc/modules/pacing/bitrate_prober.cc
@@ -35,7 +35,7 @@ BitrateProber::BitrateProber()
: probing_state_(kDisabled),
packet_size_last_send_(0),
time_last_send_ms_(-1),
- cluster_id_(0) {}
+ next_cluster_id_(0) {}
void BitrateProber::SetEnabled(bool enable) {
if (enable) {
@@ -67,16 +67,16 @@ void BitrateProber::OnIncomingPacket(uint32_t bitrate_bps,
const int kPacketsPerProbe = 5;
const float kProbeBitrateMultipliers[kMaxNumProbes] = {3, 6};
std::stringstream bitrate_log;
- bitrate_log << "Start probing for bandwidth, bitrates:";
+ bitrate_log << "Start probing for bandwidth, (bitrate:packets): ";
for (int i = 0; i < kMaxNumProbes; ++i) {
ProbeCluster cluster;
// We need one extra to get 5 deltas for the first probe, therefore (i == 0)
cluster.max_probe_packets = kPacketsPerProbe + (i == 0 ? 1 : 0);
cluster.probe_bitrate_bps = kProbeBitrateMultipliers[i] * bitrate_bps;
- cluster.id = cluster_id_++;
+ cluster.id = next_cluster_id_++;
- bitrate_log << " " << cluster.probe_bitrate_bps;
- bitrate_log << ", num packets: " << cluster.max_probe_packets;
+ bitrate_log << "(" << cluster.probe_bitrate_bps << ":"
+ << cluster.max_probe_packets << ") ";
clusters_.push(cluster);
}
« no previous file with comments | « webrtc/modules/pacing/bitrate_prober.h ('k') | webrtc/modules/pacing/paced_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698