| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 CriticalSectionScoped cs(crit_sect_.get()); | 74 CriticalSectionScoped cs(crit_sect_.get()); |
| 75 rbe_->RemoveStream(ssrc); | 75 rbe_->RemoveStream(ssrc); |
| 76 } | 76 } |
| 77 | 77 |
| 78 bool LatestEstimate(std::vector<unsigned int>* ssrcs, | 78 bool LatestEstimate(std::vector<unsigned int>* ssrcs, |
| 79 unsigned int* bitrate_bps) const override { | 79 unsigned int* bitrate_bps) const override { |
| 80 CriticalSectionScoped cs(crit_sect_.get()); | 80 CriticalSectionScoped cs(crit_sect_.get()); |
| 81 return rbe_->LatestEstimate(ssrcs, bitrate_bps); | 81 return rbe_->LatestEstimate(ssrcs, bitrate_bps); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void SetMinBitrate(int min_bitrate_bps) { | 84 void SetMinBitrate(int min_bitrate_bps) override { |
| 85 CriticalSectionScoped cs(crit_sect_.get()); | 85 CriticalSectionScoped cs(crit_sect_.get()); |
| 86 rbe_->SetMinBitrate(min_bitrate_bps); | 86 rbe_->SetMinBitrate(min_bitrate_bps); |
| 87 min_bitrate_bps_ = min_bitrate_bps; | 87 min_bitrate_bps_ = min_bitrate_bps; |
| 88 } | 88 } |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 void PickEstimatorFromHeader(const RTPHeader& header) | 91 void PickEstimatorFromHeader(const RTPHeader& header) |
| 92 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()) { | 92 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()) { |
| 93 if (header.extension.hasAbsoluteSendTime) { | 93 if (header.extension.hasAbsoluteSendTime) { |
| 94 // If we see AST in header, switch RBE strategy immediately. | 94 // If we see AST in header, switch RBE strategy immediately. |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 return std::min(bitrate_controller_->TimeUntilNextProcess(), | 241 return std::min(bitrate_controller_->TimeUntilNextProcess(), |
| 242 remote_bitrate_estimator_->TimeUntilNextProcess()); | 242 remote_bitrate_estimator_->TimeUntilNextProcess()); |
| 243 } | 243 } |
| 244 | 244 |
| 245 void CongestionController::Process() { | 245 void CongestionController::Process() { |
| 246 bitrate_controller_->Process(); | 246 bitrate_controller_->Process(); |
| 247 remote_bitrate_estimator_->Process(); | 247 remote_bitrate_estimator_->Process(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 } // namespace webrtc | 250 } // namespace webrtc |
| OLD | NEW |