| 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 21 matching lines...) Expand all  Loading... | 
|   32   inline bool operator()(const PacketInfo& lhs, const PacketInfo& rhs) { |   32   inline bool operator()(const PacketInfo& lhs, const PacketInfo& rhs) { | 
|   33     if (lhs.arrival_time_ms != rhs.arrival_time_ms) |   33     if (lhs.arrival_time_ms != rhs.arrival_time_ms) | 
|   34       return lhs.arrival_time_ms < rhs.arrival_time_ms; |   34       return lhs.arrival_time_ms < rhs.arrival_time_ms; | 
|   35     if (lhs.send_time_ms != rhs.send_time_ms) |   35     if (lhs.send_time_ms != rhs.send_time_ms) | 
|   36       return lhs.send_time_ms < rhs.send_time_ms; |   36       return lhs.send_time_ms < rhs.send_time_ms; | 
|   37     return lhs.sequence_number < rhs.sequence_number; |   37     return lhs.sequence_number < rhs.sequence_number; | 
|   38   } |   38   } | 
|   39 }; |   39 }; | 
|   40  |   40  | 
|   41 TransportFeedbackAdapter::TransportFeedbackAdapter( |   41 TransportFeedbackAdapter::TransportFeedbackAdapter( | 
|   42     BitrateController* bitrate_controller, |  | 
|   43     Clock* clock) |   42     Clock* clock) | 
|   44     : send_time_history_(clock, kSendTimeHistoryWindowMs), |   43     : send_time_history_(clock, kSendTimeHistoryWindowMs), | 
|   45       bitrate_controller_(bitrate_controller), |  | 
|   46       clock_(clock), |   44       clock_(clock), | 
|   47       current_offset_ms_(kNoTimestamp), |   45       current_offset_ms_(kNoTimestamp), | 
|   48       last_timestamp_us_(kNoTimestamp) {} |   46       last_timestamp_us_(kNoTimestamp) {} | 
|   49  |   47  | 
|   50 TransportFeedbackAdapter::~TransportFeedbackAdapter() { |   48 TransportFeedbackAdapter::~TransportFeedbackAdapter() { | 
|   51 } |   49 } | 
|   52  |   50  | 
|   53 void TransportFeedbackAdapter::SetBitrateEstimator( |   51 void TransportFeedbackAdapter::SetBitrateEstimator( | 
|   54     RemoteBitrateEstimator* rbe) { |   52     RemoteBitrateEstimator* rbe) { | 
|   55   if (bitrate_estimator_.get() != rbe) { |   53   if (bitrate_estimator_.get() != rbe) { | 
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  134   if (bitrate_estimator_.get()) |  132   if (bitrate_estimator_.get()) | 
|  135     bitrate_estimator_->IncomingPacketFeedbackVector( |  133     bitrate_estimator_->IncomingPacketFeedbackVector( | 
|  136         last_packet_feedback_vector_); |  134         last_packet_feedback_vector_); | 
|  137 } |  135 } | 
|  138  |  136  | 
|  139 std::vector<PacketInfo> TransportFeedbackAdapter::GetTransportFeedbackVector() |  137 std::vector<PacketInfo> TransportFeedbackAdapter::GetTransportFeedbackVector() | 
|  140     const { |  138     const { | 
|  141   return last_packet_feedback_vector_; |  139   return last_packet_feedback_vector_; | 
|  142 } |  140 } | 
|  143  |  141  | 
|  144 void TransportFeedbackAdapter::OnReceiveBitrateChanged( |  | 
|  145     const std::vector<uint32_t>& ssrcs, |  | 
|  146     uint32_t bitrate) { |  | 
|  147   bitrate_controller_->UpdateDelayBasedEstimate(bitrate); |  | 
|  148 } |  | 
|  149  |  | 
|  150 void TransportFeedbackAdapter::OnProbeBitrate(uint32_t bitrate) { |  | 
|  151   bitrate_controller_->UpdateProbeBitrate(bitrate); |  | 
|  152 } |  | 
|  153  |  | 
|  154 void TransportFeedbackAdapter::OnRttUpdate(int64_t avg_rtt_ms, |  142 void TransportFeedbackAdapter::OnRttUpdate(int64_t avg_rtt_ms, | 
|  155                                            int64_t max_rtt_ms) { |  143                                            int64_t max_rtt_ms) { | 
|  156   RTC_DCHECK(bitrate_estimator_.get() != nullptr); |  144   RTC_DCHECK(bitrate_estimator_.get() != nullptr); | 
|  157   bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); |  145   bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); | 
|  158 } |  146 } | 
|  159  |  147  | 
|  160 }  // namespace webrtc |  148 }  // namespace webrtc | 
| OLD | NEW |