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

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

Issue 2714503002: Perform probing on network route change. (Closed)
Patch Set: SendTimeHistoryTest.Clear fix. Created 3 years, 9 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 int transport_overhead_bytes_per_packet) { 92 int transport_overhead_bytes_per_packet) {
93 rtc::CritScope cs(&lock_); 93 rtc::CritScope cs(&lock_);
94 transport_overhead_bytes_per_packet_ = transport_overhead_bytes_per_packet; 94 transport_overhead_bytes_per_packet_ = transport_overhead_bytes_per_packet;
95 } 95 }
96 96
97 int64_t TransportFeedbackAdapter::GetProbingIntervalMs() const { 97 int64_t TransportFeedbackAdapter::GetProbingIntervalMs() const {
98 rtc::CritScope cs(&bwe_lock_); 98 rtc::CritScope cs(&bwe_lock_);
99 return delay_based_bwe_->GetProbingIntervalMs(); 99 return delay_based_bwe_->GetProbingIntervalMs();
100 } 100 }
101 101
102 void TransportFeedbackAdapter::ClearSendTimeHistory() {
103 rtc::CritScope cs(&lock_);
104 send_time_history_.Clear();
105 }
106
102 std::vector<PacketFeedback> TransportFeedbackAdapter::GetPacketFeedbackVector( 107 std::vector<PacketFeedback> TransportFeedbackAdapter::GetPacketFeedbackVector(
103 const rtcp::TransportFeedback& feedback) { 108 const rtcp::TransportFeedback& feedback) {
104 int64_t timestamp_us = feedback.GetBaseTimeUs(); 109 int64_t timestamp_us = feedback.GetBaseTimeUs();
105 // Add timestamp deltas to a local time base selected on first packet arrival. 110 // Add timestamp deltas to a local time base selected on first packet arrival.
106 // This won't be the true time base, but makes it easier to manually inspect 111 // This won't be the true time base, but makes it easier to manually inspect
107 // time stamps. 112 // time stamps.
108 if (last_timestamp_us_ == kNoTimestamp) { 113 if (last_timestamp_us_ == kNoTimestamp) {
109 current_offset_ms_ = clock_->TimeInMilliseconds(); 114 current_offset_ms_ = clock_->TimeInMilliseconds();
110 } else { 115 } else {
111 int64_t delta = timestamp_us - last_timestamp_us_; 116 int64_t delta = timestamp_us - last_timestamp_us_;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 return last_packet_feedback_vector_; 175 return last_packet_feedback_vector_;
171 } 176 }
172 177
173 void TransportFeedbackAdapter::OnRttUpdate(int64_t avg_rtt_ms, 178 void TransportFeedbackAdapter::OnRttUpdate(int64_t avg_rtt_ms,
174 int64_t max_rtt_ms) { 179 int64_t max_rtt_ms) {
175 rtc::CritScope cs(&bwe_lock_); 180 rtc::CritScope cs(&bwe_lock_);
176 delay_based_bwe_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); 181 delay_based_bwe_->OnRttUpdate(avg_rtt_ms, max_rtt_ms);
177 } 182 }
178 183
179 } // namespace webrtc 184 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698