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

Side by Side Diff: webrtc/modules/congestion_controller/delay_based_bwe.cc

Issue 2628563003: Propagate packet pacing information to SenTimeHistory (Closed)
Patch Set: Rebase 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 | « no previous file | webrtc/modules/congestion_controller/delay_based_bwe_unittest.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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } else { 350 } else {
351 kalman_estimator_->Update(t_delta, ts_delta_ms, size_delta, 351 kalman_estimator_->Update(t_delta, ts_delta_ms, size_delta,
352 detector_.State(), info.arrival_time_ms); 352 detector_.State(), info.arrival_time_ms);
353 detector_.Detect(kalman_estimator_->offset(), ts_delta_ms, 353 detector_.Detect(kalman_estimator_->offset(), ts_delta_ms,
354 kalman_estimator_->num_of_deltas(), 354 kalman_estimator_->num_of_deltas(),
355 info.arrival_time_ms); 355 info.arrival_time_ms);
356 } 356 }
357 } 357 }
358 358
359 int probing_bps = 0; 359 int probing_bps = 0;
360 if (info.probe_cluster_id != PacketInfo::kNotAProbe) { 360 if (info.probe_cluster_id != PacedPacketInfo::kNotAProbe) {
361 probing_bps = probe_bitrate_estimator_.HandleProbeAndEstimateBitrate(info); 361 probing_bps = probe_bitrate_estimator_.HandleProbeAndEstimateBitrate(info);
362 } 362 }
363 rtc::Optional<uint32_t> acked_bitrate_bps = 363 rtc::Optional<uint32_t> acked_bitrate_bps =
364 receiver_incoming_bitrate_.bitrate_bps(); 364 receiver_incoming_bitrate_.bitrate_bps();
365 // Currently overusing the bandwidth. 365 // Currently overusing the bandwidth.
366 if (detector_.State() == kBwOverusing) { 366 if (detector_.State() == kBwOverusing) {
367 if (acked_bitrate_bps && 367 if (acked_bitrate_bps &&
368 rate_control_.TimeToReduceFurther(now_ms, *acked_bitrate_bps)) { 368 rate_control_.TimeToReduceFurther(now_ms, *acked_bitrate_bps)) {
369 result.updated = 369 result.updated =
370 UpdateEstimate(info.arrival_time_ms, now_ms, acked_bitrate_bps, 370 UpdateEstimate(info.arrival_time_ms, now_ms, acked_bitrate_bps,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) { 434 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) {
435 // Called from both the configuration thread and the network thread. Shouldn't 435 // Called from both the configuration thread and the network thread. Shouldn't
436 // be called from the network thread in the future. 436 // be called from the network thread in the future.
437 rate_control_.SetMinBitrate(min_bitrate_bps); 437 rate_control_.SetMinBitrate(min_bitrate_bps);
438 } 438 }
439 439
440 int64_t DelayBasedBwe::GetProbingIntervalMs() const { 440 int64_t DelayBasedBwe::GetProbingIntervalMs() const {
441 return probing_interval_estimator_.GetIntervalMs(); 441 return probing_interval_estimator_.GetIntervalMs();
442 } 442 }
443 } // namespace webrtc 443 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/delay_based_bwe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698