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