| 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 |
| 11 #include "webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h" | 11 #include "webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h" |
| 12 | 12 |
| 13 #include <algorithm> | 13 #include <algorithm> |
| 14 #include <iterator> | 14 #include <iterator> |
| 15 #include <utility> | 15 #include <utility> |
| 16 | 16 |
| 17 #include "webrtc/base/arraysize.h" |
| 18 #include "webrtc/base/checks.h" |
| 19 #include "webrtc/base/logging.h" |
| 20 #include "webrtc/base/numerics/exp_filter.h" |
| 21 #include "webrtc/base/protobuf_utils.h" |
| 22 #include "webrtc/base/ptr_util.h" |
| 23 #include "webrtc/base/safe_conversions.h" |
| 24 #include "webrtc/base/safe_minmax.h" |
| 25 #include "webrtc/base/string_to_number.h" |
| 26 #include "webrtc/base/timeutils.h" |
| 17 #include "webrtc/common_types.h" | 27 #include "webrtc/common_types.h" |
| 18 #include "webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adapto
r_impl.h" | 28 #include "webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adapto
r_impl.h" |
| 19 #include "webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h
" | 29 #include "webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h
" |
| 20 #include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h" | 30 #include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h" |
| 21 #include "webrtc/rtc_base/arraysize.h" | |
| 22 #include "webrtc/rtc_base/checks.h" | |
| 23 #include "webrtc/rtc_base/logging.h" | |
| 24 #include "webrtc/rtc_base/numerics/exp_filter.h" | |
| 25 #include "webrtc/rtc_base/protobuf_utils.h" | |
| 26 #include "webrtc/rtc_base/ptr_util.h" | |
| 27 #include "webrtc/rtc_base/safe_conversions.h" | |
| 28 #include "webrtc/rtc_base/safe_minmax.h" | |
| 29 #include "webrtc/rtc_base/string_to_number.h" | |
| 30 #include "webrtc/rtc_base/timeutils.h" | |
| 31 #include "webrtc/system_wrappers/include/field_trial.h" | 31 #include "webrtc/system_wrappers/include/field_trial.h" |
| 32 | 32 |
| 33 namespace webrtc { | 33 namespace webrtc { |
| 34 | 34 |
| 35 namespace { | 35 namespace { |
| 36 | 36 |
| 37 // Codec parameters for Opus. | 37 // Codec parameters for Opus. |
| 38 // draft-spittka-payload-rtp-opus-03 | 38 // draft-spittka-payload-rtp-opus-03 |
| 39 | 39 |
| 40 // Recommended bitrates: | 40 // Recommended bitrates: |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 config_.uplink_bandwidth_update_interval_ms) { | 768 config_.uplink_bandwidth_update_interval_ms) { |
| 769 rtc::Optional<float> smoothed_bitrate = bitrate_smoother_->GetAverage(); | 769 rtc::Optional<float> smoothed_bitrate = bitrate_smoother_->GetAverage(); |
| 770 if (smoothed_bitrate) | 770 if (smoothed_bitrate) |
| 771 audio_network_adaptor_->SetUplinkBandwidth(*smoothed_bitrate); | 771 audio_network_adaptor_->SetUplinkBandwidth(*smoothed_bitrate); |
| 772 bitrate_smoother_last_update_time_ = rtc::Optional<int64_t>(now_ms); | 772 bitrate_smoother_last_update_time_ = rtc::Optional<int64_t>(now_ms); |
| 773 } | 773 } |
| 774 } | 774 } |
| 775 } | 775 } |
| 776 | 776 |
| 777 } // namespace webrtc | 777 } // namespace webrtc |
| OLD | NEW |