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

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

Issue 2628563003: Propagate packet pacing information to SenTimeHistory (Closed)
Patch Set: . Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 void TransportFeedbackAdapter::SetMinBitrate(int min_bitrate_bps) { 71 void TransportFeedbackAdapter::SetMinBitrate(int min_bitrate_bps) {
72 rtc::CritScope cs(&bwe_lock_); 72 rtc::CritScope cs(&bwe_lock_);
73 delay_based_bwe_->SetMinBitrate(min_bitrate_bps); 73 delay_based_bwe_->SetMinBitrate(min_bitrate_bps);
74 } 74 }
75 75
76 int64_t TransportFeedbackAdapter::GetProbingIntervalMs() const { 76 int64_t TransportFeedbackAdapter::GetProbingIntervalMs() const {
77 rtc::CritScope cs(&bwe_lock_); 77 rtc::CritScope cs(&bwe_lock_);
78 return delay_based_bwe_->GetProbingIntervalMs(); 78 return delay_based_bwe_->GetProbingIntervalMs();
79 } 79 }
80 80
81 void TransportFeedbackAdapter::OnProbingClusterCreated(int cluster_id,
82 int min_bytes,
83 int min_probes) {
84 rtc::CritScope cs(&bwe_lock_);
85 delay_based_bwe_->OnProbingClusterCreated(cluster_id, min_bytes, min_probes);
86 }
87
81 std::vector<PacketInfo> TransportFeedbackAdapter::GetPacketFeedbackVector( 88 std::vector<PacketInfo> TransportFeedbackAdapter::GetPacketFeedbackVector(
82 const rtcp::TransportFeedback& feedback) { 89 const rtcp::TransportFeedback& feedback) {
83 int64_t timestamp_us = feedback.GetBaseTimeUs(); 90 int64_t timestamp_us = feedback.GetBaseTimeUs();
84 // Add timestamp deltas to a local time base selected on first packet arrival. 91 // Add timestamp deltas to a local time base selected on first packet arrival.
85 // This won't be the true time base, but makes it easier to manually inspect 92 // This won't be the true time base, but makes it easier to manually inspect
86 // time stamps. 93 // time stamps.
87 if (last_timestamp_us_ == kNoTimestamp) { 94 if (last_timestamp_us_ == kNoTimestamp) {
88 current_offset_ms_ = clock_->TimeInMilliseconds(); 95 current_offset_ms_ = clock_->TimeInMilliseconds();
89 } else { 96 } else {
90 int64_t delta = timestamp_us - last_timestamp_us_; 97 int64_t delta = timestamp_us - last_timestamp_us_;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return last_packet_feedback_vector_; 161 return last_packet_feedback_vector_;
155 } 162 }
156 163
157 void TransportFeedbackAdapter::OnRttUpdate(int64_t avg_rtt_ms, 164 void TransportFeedbackAdapter::OnRttUpdate(int64_t avg_rtt_ms,
158 int64_t max_rtt_ms) { 165 int64_t max_rtt_ms) {
159 rtc::CritScope cs(&bwe_lock_); 166 rtc::CritScope cs(&bwe_lock_);
160 delay_based_bwe_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); 167 delay_based_bwe_->OnRttUpdate(avg_rtt_ms, max_rtt_ms);
161 } 168 }
162 169
163 } // namespace webrtc 170 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698