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