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

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

Issue 2432633002: Handle BW drop in ALR region and initiate probing (Closed)
Patch Set: Created 4 years, 2 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/paced_sender.h ('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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 retransmission, packet_counter_++)); 336 retransmission, packet_counter_++));
337 } 337 }
338 338
339 int64_t PacedSender::ExpectedQueueTimeMs() const { 339 int64_t PacedSender::ExpectedQueueTimeMs() const {
340 CriticalSectionScoped cs(critsect_.get()); 340 CriticalSectionScoped cs(critsect_.get());
341 RTC_DCHECK_GT(pacing_bitrate_kbps_, 0u); 341 RTC_DCHECK_GT(pacing_bitrate_kbps_, 0u);
342 return static_cast<int64_t>(packets_->SizeInBytes() * 8 / 342 return static_cast<int64_t>(packets_->SizeInBytes() * 8 /
343 pacing_bitrate_kbps_); 343 pacing_bitrate_kbps_);
344 } 344 }
345 345
346 bool PacedSender::InApplicationLimitedRegion() const {
347 CriticalSectionScoped cs(critsect_.get());
348 return alr_detector_->InApplicationLimitedRegion();
349 }
350
346 size_t PacedSender::QueueSizePackets() const { 351 size_t PacedSender::QueueSizePackets() const {
347 CriticalSectionScoped cs(critsect_.get()); 352 CriticalSectionScoped cs(critsect_.get());
348 return packets_->SizeInPackets(); 353 return packets_->SizeInPackets();
349 } 354 }
350 355
351 int64_t PacedSender::QueueInMs() const { 356 int64_t PacedSender::QueueInMs() const {
352 CriticalSectionScoped cs(critsect_.get()); 357 CriticalSectionScoped cs(critsect_.get());
353 358
354 int64_t oldest_packet = packets_->OldestEnqueueTimeMs(); 359 int64_t oldest_packet = packets_->OldestEnqueueTimeMs();
355 if (oldest_packet == 0) 360 if (oldest_packet == 0)
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 void PacedSender::UpdateBudgetWithElapsedTime(int64_t delta_time_ms) { 500 void PacedSender::UpdateBudgetWithElapsedTime(int64_t delta_time_ms) {
496 media_budget_->IncreaseBudget(delta_time_ms); 501 media_budget_->IncreaseBudget(delta_time_ms);
497 padding_budget_->IncreaseBudget(delta_time_ms); 502 padding_budget_->IncreaseBudget(delta_time_ms);
498 } 503 }
499 504
500 void PacedSender::UpdateBudgetWithBytesSent(size_t bytes_sent) { 505 void PacedSender::UpdateBudgetWithBytesSent(size_t bytes_sent) {
501 media_budget_->UseBudget(bytes_sent); 506 media_budget_->UseBudget(bytes_sent);
502 padding_budget_->UseBudget(bytes_sent); 507 padding_budget_->UseBudget(bytes_sent);
503 } 508 }
504 } // namespace webrtc 509 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/pacing/paced_sender.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698