Chromium Code Reviews| 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 AudioEncoder::AudioEncoderStats AudioEncoderOpus::GetStats() const { | |
| 777 if (audio_network_adaptor_) { | |
| 778 auto ana_stats = audio_network_adaptor_->GetStats(); | |
| 779 auto stats = AudioEncoderStats(); | |
|
ossu
2017/08/31 13:13:10
No. :)
ivoc
2017/08/31 14:57:50
Oops. :)
| |
| 780 stats.ana_bitrate_action_counter = ana_stats.ana_bitrate_action_counter; | |
| 781 stats.ana_channel_action_counter = ana_stats.ana_channel_action_counter; | |
| 782 stats.ana_dtx_action_counter = ana_stats.ana_dtx_action_counter; | |
| 783 stats.ana_fec_action_counter = ana_stats.ana_fec_action_counter; | |
| 784 stats.ana_frame_length_action_counter = | |
| 785 ana_stats.ana_frame_length_action_counter; | |
| 786 return stats; | |
| 787 } else { | |
| 788 return AudioEncoderStats(); | |
| 789 } | |
| 790 } | |
| 791 | |
| 776 } // namespace webrtc | 792 } // namespace webrtc |
| OLD | NEW |