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

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

Issue 2005313003: Propagate probing cluster id to SendTimeHistory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Test probe_cluster_id in PacketRouterTest. 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/paced_sender.h ('k') | webrtc/modules/pacing/paced_sender_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/paced_sender.cc
diff --git a/webrtc/modules/pacing/paced_sender.cc b/webrtc/modules/pacing/paced_sender.cc
index 167be23ab624fda0c7338203dfe9fffb94218257..58c7d2d368ad32f7f03fa5b4d2592c083895174d 100644
--- a/webrtc/modules/pacing/paced_sender.cc
+++ b/webrtc/modules/pacing/paced_sender.cc
@@ -389,6 +389,9 @@ void PacedSender::Process() {
int64_t delta_time_ms = std::min(kMaxIntervalTimeMs, elapsed_time_ms);
UpdateBytesPerInterval(delta_time_ms);
}
+
+ int probe_cluster_id = prober_->IsProbing() ? prober_->CurrentClusterId()
+ : PacketInfo::kNotAProbe;
while (!packets_->Empty()) {
if (media_budget_->bytes_remaining() == 0 && !prober_->IsProbing())
return;
@@ -397,8 +400,6 @@ void PacedSender::Process() {
// element from the priority queue but keep it in storage, so that we can
// reinsert it if send fails.
const paced_sender::Packet& packet = packets_->BeginPop();
- int probe_cluster_id =
- prober_->IsProbing() ? prober_->CurrentClusterId() : -1;
if (SendPacket(packet, probe_cluster_id)) {
// Send succeeded, remove it from the queue.
@@ -424,7 +425,7 @@ void PacedSender::Process() {
}
if (padding_needed > 0)
- SendPadding(static_cast<size_t>(padding_needed));
+ SendPadding(padding_needed, probe_cluster_id);
}
bool PacedSender::SendPacket(const paced_sender::Packet& packet,
@@ -454,9 +455,10 @@ bool PacedSender::SendPacket(const paced_sender::Packet& packet,
return success;
}
-void PacedSender::SendPadding(size_t padding_needed) {
+void PacedSender::SendPadding(size_t padding_needed, int probe_cluster_id) {
critsect_->Leave();
- size_t bytes_sent = packet_sender_->TimeToSendPadding(padding_needed);
+ size_t bytes_sent =
+ packet_sender_->TimeToSendPadding(padding_needed, probe_cluster_id);
critsect_->Enter();
if (bytes_sent > 0) {
« no previous file with comments | « webrtc/modules/pacing/paced_sender.h ('k') | webrtc/modules/pacing/paced_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698