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

Unified Diff: webrtc/voice_engine/channel.cc

Issue 1993783002: Moved CreateBuiltinDecoderFactory out to VoEBaseImpl. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@audio-decoder-factory-injections-2
Patch Set: Rebass! How low can you go? Created 4 years, 7 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/voice_engine/channel.cc
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc
index 742e53e836c5e933b9ae49533b9ee128494d5590..61a4cb0f2b339041de0e1707adfaa446d1b029fd 100644
--- a/webrtc/voice_engine/channel.cc
+++ b/webrtc/voice_engine/channel.cc
@@ -673,11 +673,23 @@ int32_t Channel::CreateChannel(Channel*& channel,
uint32_t instanceId,
RtcEventLog* const event_log,
const Config& config) {
+ return CreateChannel(channel, channelId, instanceId, event_log, config,
+ CreateBuiltinAudioDecoderFactory());
+}
+
+int32_t Channel::CreateChannel(
+ Channel*& channel,
+ int32_t channelId,
+ uint32_t instanceId,
+ RtcEventLog* const event_log,
+ const Config& config,
+ const rtc::scoped_refptr<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, decoder_factory);
if (channel == NULL) {
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId, channelId),
"Channel::CreateChannel() unable to allocate memory for"
@@ -737,7 +749,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,
+ const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory)
: _instanceId(instanceId),
_channelId(channelId),
event_log_(event_log),
@@ -826,7 +839,7 @@ Channel::Channel(int32_t channelId,
acm_config.neteq_config.enable_fast_accelerate =
config.Get<NetEqFastAccelerate>().enabled;
acm_config.neteq_config.enable_muted_state = true;
- acm_config.decoder_factory = CreateBuiltinAudioDecoderFactory();
+ acm_config.decoder_factory = decoder_factory;
audio_coding_.reset(AudioCodingModule::Create(acm_config));
_outputAudioLevel.Clear();

Powered by Google App Engine
This is Rietveld 408576698