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

Unified Diff: webrtc/voice_engine/voe_base_impl.cc

Issue 1949533002: WIP: Move the creation of AudioCodecFactory into PeerConnectionFactory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Retained Channel API by adding overloads; also add intended AudioReceiveStream API 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/voe_base_impl.cc
diff --git a/webrtc/voice_engine/voe_base_impl.cc b/webrtc/voice_engine/voe_base_impl.cc
index c9d5e178e9a984e3840baa2f5971b2e9582693b2..5f38e558da18443a086788e821b809da19e50cba 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"
@@ -212,7 +213,8 @@ int VoEBaseImpl::DeRegisterVoiceEngineObserver() {
}
int VoEBaseImpl::Init(AudioDeviceModule* external_adm,
- AudioProcessing* audioproc) {
+ AudioProcessing* audioproc,
+ std::shared_ptr<AudioDecoderFactory> decoder_factory) {
rtc::CritScope cs(shared_->crit_sec());
WebRtcSpl_Init();
if (shared_->statistics().Initialized()) {
@@ -375,6 +377,11 @@ int VoEBaseImpl::Init(AudioDeviceModule* external_adm,
}
#endif
+ if (decoder_factory)
+ decoder_factory_ = std::move(decoder_factory);
+ else
+ decoder_factory_ = CreateBuiltinAudioDecoderFactory();
kwiberg-webrtc 2016/05/17 13:33:48 ?:
ossu 2016/05/17 14:25:35 That is... punctuation! If it's a question, my ans
kwiberg-webrtc 2016/05/18 03:06:35 Oh, nothing so subtle! I was jus suggesting dec
+
return shared_->statistics().SetInitialized();
}
@@ -390,7 +397,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 +409,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);
}
« webrtc/voice_engine/include/voe_base.h ('K') | « 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