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

Unified Diff: webrtc/media/engine/webrtcvoiceengine.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
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvoiceengine.cc
diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc
index df93ac28f44db14448bc59ef597d70e5415c71f6..b9a725b0a0519bce6ccd006dd1d6ed4ec3de6378 100644
--- a/webrtc/media/engine/webrtcvoiceengine.cc
+++ b/webrtc/media/engine/webrtcvoiceengine.cc
@@ -1226,6 +1226,8 @@ class WebRtcVoiceMediaChannel::WebRtcAudioSendStream
: voe_audio_transport_(voe_audio_transport),
call_(call),
config_(send_transport),
+ send_side_bwe_with_overhead_(webrtc::field_trial::FindFullName(
+ "WebRTC-SendSideBwe-WithOverhead") == "Enabled"),
max_send_bitrate_bps_(max_send_bitrate_bps),
rtp_parameters_(CreateRtpParametersWithOneEncoding()) {
RTC_DCHECK_GE(ch, 0);
@@ -1458,8 +1460,7 @@ class WebRtcVoiceMediaChannel::WebRtcAudioSendStream
config_.max_bitrate_bps = kOpusBitrateFbBps;
// TODO(mflodman): Keep testing this and set proper values.
// Note: This is an early experiment currently only supported by Opus.
- if (webrtc::field_trial::FindFullName(
- "WebRTC-SendSideBwe-WithOverhead") == "Enabled") {
+ if (send_side_bwe_with_overhead_) {
auto packet_sizes_ms = WebRtcVoiceCodecs::GetPacketSizesMs(
config_.send_codec_spec.codec_inst);
if (!packet_sizes_ms.empty()) {
@@ -1500,6 +1501,7 @@ class WebRtcVoiceMediaChannel::WebRtcAudioSendStream
webrtc::AudioTransport* const voe_audio_transport_ = nullptr;
webrtc::Call* call_ = nullptr;
webrtc::AudioSendStream::Config config_;
+ const bool send_side_bwe_with_overhead_;
// The stream is owned by WebRtcAudioSendStream and may be reallocated if
// configuration changes.
webrtc::AudioSendStream* stream_ = nullptr;
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698