OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 now_ms - *bitrate_smoother_last_update_time_ >= | 766 now_ms - *bitrate_smoother_last_update_time_ >= |
767 config_.uplink_bandwidth_update_interval_ms) { | 767 config_.uplink_bandwidth_update_interval_ms) { |
768 rtc::Optional<float> smoothed_bitrate = bitrate_smoother_->GetAverage(); | 768 rtc::Optional<float> smoothed_bitrate = bitrate_smoother_->GetAverage(); |
769 if (smoothed_bitrate) | 769 if (smoothed_bitrate) |
770 audio_network_adaptor_->SetUplinkBandwidth(*smoothed_bitrate); | 770 audio_network_adaptor_->SetUplinkBandwidth(*smoothed_bitrate); |
771 bitrate_smoother_last_update_time_ = rtc::Optional<int64_t>(now_ms); | 771 bitrate_smoother_last_update_time_ = rtc::Optional<int64_t>(now_ms); |
772 } | 772 } |
773 } | 773 } |
774 } | 774 } |
775 | 775 |
| 776 ANAStats AudioEncoderOpus::GetANAStats() const { |
| 777 if (audio_network_adaptor_) { |
| 778 return audio_network_adaptor_->GetStats(); |
| 779 } |
| 780 return ANAStats(); |
| 781 } |
| 782 |
776 } // namespace webrtc | 783 } // namespace webrtc |
OLD | NEW |