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

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

Issue 2504023002: Implement periodic bandwidth probing in application-limited region. (Closed)
Patch Set: address feedback Created 4 years 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') | webrtc/video/video_send_stream.cc » ('j') | 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 { 346 rtc::Optional<int64_t> PacedSender::GetApplicationLimitedRegionStartTime()
347 const {
347 CriticalSectionScoped cs(critsect_.get()); 348 CriticalSectionScoped cs(critsect_.get());
348 return alr_detector_->InApplicationLimitedRegion(); 349 return alr_detector_->GetApplicationLimitedRegionStartTime();
349 } 350 }
350 351
351 size_t PacedSender::QueueSizePackets() const { 352 size_t PacedSender::QueueSizePackets() const {
352 CriticalSectionScoped cs(critsect_.get()); 353 CriticalSectionScoped cs(critsect_.get());
353 return packets_->SizeInPackets(); 354 return packets_->SizeInPackets();
354 } 355 }
355 356
356 int64_t PacedSender::QueueInMs() const { 357 int64_t PacedSender::QueueInMs() const {
357 CriticalSectionScoped cs(critsect_.get()); 358 CriticalSectionScoped cs(critsect_.get());
358 359
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 void PacedSender::UpdateBudgetWithElapsedTime(int64_t delta_time_ms) { 501 void PacedSender::UpdateBudgetWithElapsedTime(int64_t delta_time_ms) {
501 media_budget_->IncreaseBudget(delta_time_ms); 502 media_budget_->IncreaseBudget(delta_time_ms);
502 padding_budget_->IncreaseBudget(delta_time_ms); 503 padding_budget_->IncreaseBudget(delta_time_ms);
503 } 504 }
504 505
505 void PacedSender::UpdateBudgetWithBytesSent(size_t bytes_sent) { 506 void PacedSender::UpdateBudgetWithBytesSent(size_t bytes_sent) {
506 media_budget_->UseBudget(bytes_sent); 507 media_budget_->UseBudget(bytes_sent);
507 padding_budget_->UseBudget(bytes_sent); 508 padding_budget_->UseBudget(bytes_sent);
508 } 509 }
509 } // namespace webrtc 510 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/pacing/paced_sender.h ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698