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

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

Issue 2518923003: Pass time constant to bwe smoothing filter. (Closed)
Patch Set: Add probing_interval_ms to NullBitrateObserver. 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
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 int64_t send_time_ms) { 66 int64_t send_time_ms) {
67 rtc::CritScope cs(&lock_); 67 rtc::CritScope cs(&lock_);
68 send_time_history_.OnSentPacket(sequence_number, send_time_ms); 68 send_time_history_.OnSentPacket(sequence_number, send_time_ms);
69 } 69 }
70 70
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 {
77 rtc::CritScope cs(&bwe_lock_);
78 return delay_based_bwe_->GetProbingIntervalMs();
79 }
80
76 std::vector<PacketInfo> TransportFeedbackAdapter::GetPacketFeedbackVector( 81 std::vector<PacketInfo> TransportFeedbackAdapter::GetPacketFeedbackVector(
77 const rtcp::TransportFeedback& feedback) { 82 const rtcp::TransportFeedback& feedback) {
78 int64_t timestamp_us = feedback.GetBaseTimeUs(); 83 int64_t timestamp_us = feedback.GetBaseTimeUs();
79 // Add timestamp deltas to a local time base selected on first packet arrival. 84 // Add timestamp deltas to a local time base selected on first packet arrival.
80 // This won't be the true time base, but makes it easier to manually inspect 85 // This won't be the true time base, but makes it easier to manually inspect
81 // time stamps. 86 // time stamps.
82 if (last_timestamp_us_ == kNoTimestamp) { 87 if (last_timestamp_us_ == kNoTimestamp) {
83 current_offset_ms_ = clock_->TimeInMilliseconds(); 88 current_offset_ms_ = clock_->TimeInMilliseconds();
84 } else { 89 } else {
85 int64_t delta = timestamp_us - last_timestamp_us_; 90 int64_t delta = timestamp_us - last_timestamp_us_;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return last_packet_feedback_vector_; 154 return last_packet_feedback_vector_;
150 } 155 }
151 156
152 void TransportFeedbackAdapter::OnRttUpdate(int64_t avg_rtt_ms, 157 void TransportFeedbackAdapter::OnRttUpdate(int64_t avg_rtt_ms,
153 int64_t max_rtt_ms) { 158 int64_t max_rtt_ms) {
154 rtc::CritScope cs(&bwe_lock_); 159 rtc::CritScope cs(&bwe_lock_);
155 delay_based_bwe_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); 160 delay_based_bwe_->OnRttUpdate(avg_rtt_ms, max_rtt_ms);
156 } 161 }
157 162
158 } // namespace webrtc 163 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698