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

Side by Side Diff: webrtc/modules/pacing/paced_sender.cc

Issue 2681733004: Fix bug in BitrateProber where an old probe added at a high bitrate will stay active indefinit… (Closed)
Patch Set: Add unittest. Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « webrtc/modules/pacing/bitrate_prober_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 time_last_update_us_(clock->TimeInMicroseconds()), 262 time_last_update_us_(clock->TimeInMicroseconds()),
263 packets_(new paced_sender::PacketQueue(clock)), 263 packets_(new paced_sender::PacketQueue(clock)),
264 packet_counter_(0) { 264 packet_counter_(0) {
265 UpdateBudgetWithElapsedTime(kMinPacketLimitMs); 265 UpdateBudgetWithElapsedTime(kMinPacketLimitMs);
266 } 266 }
267 267
268 PacedSender::~PacedSender() {} 268 PacedSender::~PacedSender() {}
269 269
270 void PacedSender::CreateProbeCluster(int bitrate_bps) { 270 void PacedSender::CreateProbeCluster(int bitrate_bps) {
271 CriticalSectionScoped cs(critsect_.get()); 271 CriticalSectionScoped cs(critsect_.get());
272 prober_->CreateProbeCluster(bitrate_bps); 272 prober_->CreateProbeCluster(bitrate_bps, clock_->TimeInMilliseconds());
273 } 273 }
274 274
275 void PacedSender::Pause() { 275 void PacedSender::Pause() {
276 LOG(LS_INFO) << "PacedSender paused."; 276 LOG(LS_INFO) << "PacedSender paused.";
277 CriticalSectionScoped cs(critsect_.get()); 277 CriticalSectionScoped cs(critsect_.get());
278 paused_ = true; 278 paused_ = true;
279 } 279 }
280 280
281 void PacedSender::Resume() { 281 void PacedSender::Resume() {
282 LOG(LS_INFO) << "PacedSender resumed."; 282 LOG(LS_INFO) << "PacedSender resumed.";
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 void PacedSender::UpdateBudgetWithElapsedTime(int64_t delta_time_ms) { 494 void PacedSender::UpdateBudgetWithElapsedTime(int64_t delta_time_ms) {
495 media_budget_->IncreaseBudget(delta_time_ms); 495 media_budget_->IncreaseBudget(delta_time_ms);
496 padding_budget_->IncreaseBudget(delta_time_ms); 496 padding_budget_->IncreaseBudget(delta_time_ms);
497 } 497 }
498 498
499 void PacedSender::UpdateBudgetWithBytesSent(size_t bytes_sent) { 499 void PacedSender::UpdateBudgetWithBytesSent(size_t bytes_sent) {
500 media_budget_->UseBudget(bytes_sent); 500 media_budget_->UseBudget(bytes_sent);
501 padding_budget_->UseBudget(bytes_sent); 501 padding_budget_->UseBudget(bytes_sent);
502 } 502 }
503 } // namespace webrtc 503 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/pacing/bitrate_prober_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698