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

Unified Diff: webrtc/voice_engine/voe_base_impl.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
« no previous file with comments | « webrtc/voice_engine/voe_base_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/voe_base_impl.cc
diff --git a/webrtc/voice_engine/voe_base_impl.cc b/webrtc/voice_engine/voe_base_impl.cc
index 8e93778f7ed572657264aa060095216a51e36198..bfc85fc02acac3441c7c20524606a1ee6faf10b5 100644
--- a/webrtc/voice_engine/voe_base_impl.cc
+++ b/webrtc/voice_engine/voe_base_impl.cc
@@ -14,6 +14,7 @@
#include "webrtc/base/logging.h"
#include "webrtc/common.h"
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h"
#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
#include "webrtc/modules/audio_device/audio_device_impl.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
@@ -211,8 +212,10 @@ int VoEBaseImpl::DeRegisterVoiceEngineObserver() {
return 0;
}
-int VoEBaseImpl::Init(AudioDeviceModule* external_adm,
- AudioProcessing* audioproc) {
+int VoEBaseImpl::Init(
+ AudioDeviceModule* external_adm,
+ AudioProcessing* audioproc,
+ const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory) {
rtc::CritScope cs(shared_->crit_sec());
WebRtcSpl_Init();
if (shared_->statistics().Initialized()) {
@@ -375,6 +378,11 @@ int VoEBaseImpl::Init(AudioDeviceModule* external_adm,
}
#endif
+ if (decoder_factory)
+ decoder_factory_ = decoder_factory;
+ else
+ decoder_factory_ = CreateBuiltinAudioDecoderFactory();
the sun 2016/05/30 18:46:48 I think since the VoEBase::Init() interface has be
ossu 2016/05/31 08:54:18 Now, the last time we spoke about this you wanted
+
return shared_->statistics().SetInitialized();
}
@@ -390,7 +398,8 @@ int VoEBaseImpl::CreateChannel() {
return -1;
}
- voe::ChannelOwner channel_owner = shared_->channel_manager().CreateChannel();
+ voe::ChannelOwner channel_owner =
+ shared_->channel_manager().CreateChannel(decoder_factory_);
return InitializeChannel(&channel_owner);
}
@@ -401,7 +410,7 @@ int VoEBaseImpl::CreateChannel(const Config& config) {
return -1;
}
voe::ChannelOwner channel_owner =
- shared_->channel_manager().CreateChannel(config);
+ shared_->channel_manager().CreateChannel(config, decoder_factory_);
return InitializeChannel(&channel_owner);
}
« no previous file with comments | « webrtc/voice_engine/voe_base_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698