Index: webrtc/voice_engine/channel.cc |
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc |
index d6daffddf83ee0f751d59665e85b15d89ff2622b..19395e9b2997a7b76b48e9b64657ebdf59d2a710 100644 |
--- a/webrtc/voice_engine/channel.cc |
+++ b/webrtc/voice_engine/channel.cc |
@@ -21,7 +21,6 @@ |
#include "webrtc/base/thread_checker.h" |
#include "webrtc/base/timeutils.h" |
#include "webrtc/call/rtc_event_log.h" |
-#include "webrtc/common.h" |
#include "webrtc/config.h" |
#include "webrtc/modules/audio_device/include/audio_device.h" |
#include "webrtc/modules/audio_processing/include/audio_processing.h" |
@@ -751,13 +750,12 @@ int32_t Channel::CreateChannel( |
Channel*& channel, |
int32_t channelId, |
uint32_t instanceId, |
- const Config& config, |
- const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory) { |
+ const AudioCodingModule::Config& acm_config) { |
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId, channelId), |
"Channel::CreateChannel(channelId=%d, instanceId=%d)", channelId, |
instanceId); |
- channel = new Channel(channelId, instanceId, config, decoder_factory); |
+ channel = new Channel(channelId, instanceId, acm_config); |
if (channel == NULL) { |
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId, channelId), |
"Channel::CreateChannel() unable to allocate memory for" |
@@ -816,8 +814,7 @@ void Channel::RecordFileEnded(int32_t id) { |
Channel::Channel(int32_t channelId, |
uint32_t instanceId, |
- const Config& config, |
- const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory) |
+ const AudioCodingModule::Config& acm_config) |
: _instanceId(instanceId), |
_channelId(channelId), |
event_log_proxy_(new RtcEventLogProxy()), |
@@ -883,28 +880,19 @@ Channel::Channel(int32_t channelId, |
rtcp_observer_(new VoERtcpObserver(this)), |
network_predictor_(new NetworkPredictor(Clock::GetRealTimeClock())), |
associate_send_channel_(ChannelOwner(nullptr)), |
- pacing_enabled_(config.Get<VoicePacing>().enabled), |
+ pacing_enabled_(true), // TODO(solenberg): Remove flag. |
stefan-webrtc
2016/09/02 08:23:17
Doesn't look too complicated to actually remove th
the sun
2016/09/02 08:54:40
Yes, I realized, and that's why, unfortunately, we
|
feedback_observer_proxy_(new TransportFeedbackProxy()), |
seq_num_allocator_proxy_(new TransportSequenceNumberProxy()), |
rtp_packet_sender_proxy_(new RtpPacketSenderProxy()), |
retransmission_rate_limiter_(new RateLimiter(Clock::GetRealTimeClock(), |
kMaxRetransmissionWindowMs)), |
- decoder_factory_(decoder_factory) { |
+ decoder_factory_(acm_config.decoder_factory) { |
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId, _channelId), |
"Channel::Channel() - ctor"); |
- AudioCodingModule::Config acm_config; |
- acm_config.id = VoEModuleId(instanceId, channelId); |
- if (config.Get<NetEqCapacityConfig>().enabled) { |
- // Clamping the buffer capacity at 20 packets. While going lower will |
- // probably work, it makes little sense. |
- acm_config.neteq_config.max_packets_in_buffer = |
- std::max(20, config.Get<NetEqCapacityConfig>().capacity); |
- } |
- acm_config.neteq_config.enable_fast_accelerate = |
- config.Get<NetEqFastAccelerate>().enabled; |
- acm_config.neteq_config.enable_muted_state = true; |
- acm_config.decoder_factory = decoder_factory; |
- audio_coding_.reset(AudioCodingModule::Create(acm_config)); |
+ AudioCodingModule::Config acm_config_copy(acm_config); |
+ acm_config_copy.id = VoEModuleId(instanceId, channelId); |
+ acm_config_copy.neteq_config.enable_muted_state = true; |
+ audio_coding_.reset(AudioCodingModule::Create(acm_config_copy)); |
_outputAudioLevel.Clear(); |