Index: webrtc/voice_engine/channel.cc |
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc |
index a6c0c8d050538c45774ddee0883e6dad4a72450e..8650948f28924a1444f5155a43a21e2c5733898e 100644 |
--- a/webrtc/voice_engine/channel.cc |
+++ b/webrtc/voice_engine/channel.cc |
@@ -21,6 +21,7 @@ |
#include "webrtc/base/timeutils.h" |
#include "webrtc/common.h" |
#include "webrtc/config.h" |
+#include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h" |
ossu
2016/05/03 16:13:22
This one should go.
ossu
2016/05/11 11:22:32
Not anymore!
|
#include "webrtc/modules/audio_device/include/audio_device.h" |
#include "webrtc/modules/audio_processing/include/audio_processing.h" |
#include "webrtc/modules/include/module_common_types.h" |
@@ -654,16 +655,19 @@ int32_t Channel::NeededFrequency(int32_t id) const { |
return (highestNeeded); |
} |
-int32_t Channel::CreateChannel(Channel*& channel, |
- int32_t channelId, |
- uint32_t instanceId, |
- RtcEventLog* const event_log, |
- const Config& config) { |
+int32_t Channel::CreateChannel( |
+ Channel*& channel, |
+ int32_t channelId, |
+ uint32_t instanceId, |
+ RtcEventLog* const event_log, |
+ const Config& config, |
+ std::shared_ptr<AudioDecoderFactory> decoder_factory) { |
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId, channelId), |
"Channel::CreateChannel(channelId=%d, instanceId=%d)", channelId, |
instanceId); |
- channel = new Channel(channelId, instanceId, event_log, config); |
+ channel = new Channel(channelId, instanceId, event_log, config, |
+ std::move(decoder_factory)); |
if (channel == NULL) { |
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId, channelId), |
"Channel::CreateChannel() unable to allocate memory for" |
@@ -723,7 +727,8 @@ void Channel::RecordFileEnded(int32_t id) { |
Channel::Channel(int32_t channelId, |
uint32_t instanceId, |
RtcEventLog* const event_log, |
- const Config& config) |
+ const Config& config, |
+ std::shared_ptr<AudioDecoderFactory> decoder_factory) |
the sun
2016/05/03 21:07:30
I think I'd rather avoid this and instead add a se
|
: _instanceId(instanceId), |
_channelId(channelId), |
event_log_(event_log), |
@@ -811,6 +816,7 @@ Channel::Channel(int32_t channelId, |
} |
acm_config.neteq_config.enable_fast_accelerate = |
config.Get<NetEqFastAccelerate>().enabled; |
+ acm_config.decoder_factory = std::move(decoder_factory); |
audio_coding_.reset(AudioCodingModule::Create(acm_config)); |
_outputAudioLevel.Clear(); |
@@ -1023,13 +1029,14 @@ int32_t Channel::Init() { |
return 0; |
} |
-int32_t Channel::SetEngineInformation(Statistics& engineStatistics, |
- OutputMixer& outputMixer, |
- voe::TransmitMixer& transmitMixer, |
- ProcessThread& moduleProcessThread, |
- AudioDeviceModule& audioDeviceModule, |
- VoiceEngineObserver* voiceEngineObserver, |
- rtc::CriticalSection* callbackCritSect) { |
+int32_t Channel::SetEngineInformation( |
+ Statistics& engineStatistics, |
+ OutputMixer& outputMixer, |
+ voe::TransmitMixer& transmitMixer, |
+ ProcessThread& moduleProcessThread, |
+ AudioDeviceModule& audioDeviceModule, |
+ VoiceEngineObserver* voiceEngineObserver, |
+ rtc::CriticalSection* callbackCritSect) { |
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), |
"Channel::SetEngineInformation()"); |
_engineStatisticsPtr = &engineStatistics; |