Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc

Issue 2717973005: Test field trial group with startswith rather than equals. (Closed)
Patch Set: const char*, two more IsEnabled Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
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::IsEnabled(
187 "WebRTC-SendSideBwe-WithOverhead") == "Enabled"), 187 "WebRTC-SendSideBwe-WithOverhead")),
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698