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

Unified Diff: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc

Issue 2657863002: Move more calls to webrtc::field_trial::FindFullName into ctor (Closed)
Patch Set: . Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
index 8e0254fe25dee147ff612a1d996826026663ac5f..bd0afc6fa8eeda15a65592bacf9b29e22faf9742 100644
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
@@ -174,7 +174,9 @@ AudioEncoderOpus::AudioEncoderOpus(
const Config& config,
AudioNetworkAdaptorCreator&& audio_network_adaptor_creator,
std::unique_ptr<SmoothingFilter> bitrate_smoother)
- : packet_loss_rate_(0.0),
+ : send_side_bwe_with_overhead_(webrtc::field_trial::FindFullName(
+ "WebRTC-SendSideBwe-WithOverhead") == "Enabled"),
+ packet_loss_rate_(0.0),
inst_(nullptr),
packet_loss_fraction_smoother_(new PacketLossFractionSmoother(
config.clock)),
@@ -314,8 +316,7 @@ void AudioEncoderOpus::OnReceivedUplinkBandwidth(
bitrate_smoother_->AddSample(target_audio_bitrate_bps);
ApplyAudioNetworkAdaptor();
- } else if (webrtc::field_trial::FindFullName(
- "WebRTC-SendSideBwe-WithOverhead") == "Enabled") {
+ } else if (send_side_bwe_with_overhead_) {
if (!overhead_bytes_per_packet_) {
LOG(LS_INFO)
<< "AudioEncoderOpus: Overhead unknown, target audio bitrate "

Powered by Google App Engine
This is Rietveld 408576698