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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 return bitrate_bps <= complexity_threshold_bps | 177 return bitrate_bps <= complexity_threshold_bps |
178 ? rtc::Optional<int>(low_rate_complexity) | 178 ? rtc::Optional<int>(low_rate_complexity) |
179 : rtc::Optional<int>(complexity); | 179 : rtc::Optional<int>(complexity); |
180 } | 180 } |
181 | 181 |
182 AudioEncoderOpus::AudioEncoderOpus( | 182 AudioEncoderOpus::AudioEncoderOpus( |
183 const Config& config, | 183 const Config& config, |
184 AudioNetworkAdaptorCreator&& audio_network_adaptor_creator, | 184 AudioNetworkAdaptorCreator&& audio_network_adaptor_creator, |
185 std::unique_ptr<SmoothingFilter> bitrate_smoother) | 185 std::unique_ptr<SmoothingFilter> bitrate_smoother) |
186 : send_side_bwe_with_overhead_(webrtc::field_trial::FindFullName( | 186 : send_side_bwe_with_overhead_(webrtc::field_trial::FindFullName( |
187 "WebRTC-SendSideBwe-WithOverhead") == "Enabled"), | 187 "WebRTC-SendSideBwe-WithOverhead").find("Enabled") == 0), |
tommi
2017/02/28 11:52:41
IsEnabled?
sprang_webrtc
2017/02/28 12:18:31
Done.
| |
188 packet_loss_rate_(0.0), | 188 packet_loss_rate_(0.0), |
189 inst_(nullptr), | 189 inst_(nullptr), |
190 packet_loss_fraction_smoother_(new PacketLossFractionSmoother( | 190 packet_loss_fraction_smoother_(new PacketLossFractionSmoother( |
191 config.clock)), | 191 config.clock)), |
192 audio_network_adaptor_creator_( | 192 audio_network_adaptor_creator_( |
193 audio_network_adaptor_creator | 193 audio_network_adaptor_creator |
194 ? std::move(audio_network_adaptor_creator) | 194 ? std::move(audio_network_adaptor_creator) |
195 : [this](const std::string& config_string, | 195 : [this](const std::string& config_string, |
196 RtcEventLog* event_log, | 196 RtcEventLog* event_log, |
197 const Clock* clock) { | 197 const Clock* clock) { |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
561 config_.uplink_bandwidth_update_interval_ms) { | 561 config_.uplink_bandwidth_update_interval_ms) { |
562 rtc::Optional<float> smoothed_bitrate = bitrate_smoother_->GetAverage(); | 562 rtc::Optional<float> smoothed_bitrate = bitrate_smoother_->GetAverage(); |
563 if (smoothed_bitrate) | 563 if (smoothed_bitrate) |
564 audio_network_adaptor_->SetUplinkBandwidth(*smoothed_bitrate); | 564 audio_network_adaptor_->SetUplinkBandwidth(*smoothed_bitrate); |
565 bitrate_smoother_last_update_time_ = rtc::Optional<int64_t>(now_ms); | 565 bitrate_smoother_last_update_time_ = rtc::Optional<int64_t>(now_ms); |
566 } | 566 } |
567 } | 567 } |
568 } | 568 } |
569 | 569 |
570 } // namespace webrtc | 570 } // namespace webrtc |
OLD | NEW |