| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |    2  *  Copyright (c) 2016 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  439   return result; |  439   return result; | 
|  440 } |  440 } | 
|  441  |  441  | 
|  442 bool DelayBasedBwe::UpdateEstimate(int64_t arrival_time_ms, |  442 bool DelayBasedBwe::UpdateEstimate(int64_t arrival_time_ms, | 
|  443                                    int64_t now_ms, |  443                                    int64_t now_ms, | 
|  444                                    rtc::Optional<uint32_t> acked_bitrate_bps, |  444                                    rtc::Optional<uint32_t> acked_bitrate_bps, | 
|  445                                    uint32_t* target_bitrate_bps) { |  445                                    uint32_t* target_bitrate_bps) { | 
|  446   // TODO(terelius): RateControlInput::noise_var is deprecated and will be |  446   // TODO(terelius): RateControlInput::noise_var is deprecated and will be | 
|  447   // removed. In the meantime, we set it to zero. |  447   // removed. In the meantime, we set it to zero. | 
|  448   const RateControlInput input(detector_.State(), acked_bitrate_bps, 0); |  448   const RateControlInput input(detector_.State(), acked_bitrate_bps, 0); | 
|  449   rate_control_.Update(&input, now_ms); |  449   *target_bitrate_bps = rate_control_.Update(&input, now_ms); | 
|  450   *target_bitrate_bps = rate_control_.UpdateBandwidthEstimate(now_ms); |  | 
|  451   return rate_control_.ValidEstimate(); |  450   return rate_control_.ValidEstimate(); | 
|  452 } |  451 } | 
|  453  |  452  | 
|  454 void DelayBasedBwe::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { |  453 void DelayBasedBwe::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { | 
|  455   rate_control_.SetRtt(avg_rtt_ms); |  454   rate_control_.SetRtt(avg_rtt_ms); | 
|  456 } |  455 } | 
|  457  |  456  | 
|  458 bool DelayBasedBwe::LatestEstimate(std::vector<uint32_t>* ssrcs, |  457 bool DelayBasedBwe::LatestEstimate(std::vector<uint32_t>* ssrcs, | 
|  459                                    uint32_t* bitrate_bps) const { |  458                                    uint32_t* bitrate_bps) const { | 
|  460   // Currently accessed from both the process thread (see |  459   // Currently accessed from both the process thread (see | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
|  479 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) { |  478 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) { | 
|  480   // Called from both the configuration thread and the network thread. Shouldn't |  479   // Called from both the configuration thread and the network thread. Shouldn't | 
|  481   // be called from the network thread in the future. |  480   // be called from the network thread in the future. | 
|  482   rate_control_.SetMinBitrate(min_bitrate_bps); |  481   rate_control_.SetMinBitrate(min_bitrate_bps); | 
|  483 } |  482 } | 
|  484  |  483  | 
|  485 int64_t DelayBasedBwe::GetProbingIntervalMs() const { |  484 int64_t DelayBasedBwe::GetProbingIntervalMs() const { | 
|  486   return probing_interval_estimator_.GetIntervalMs(); |  485   return probing_interval_estimator_.GetIntervalMs(); | 
|  487 } |  486 } | 
|  488 }  // namespace webrtc |  487 }  // namespace webrtc | 
| OLD | NEW |