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

Side by Side Diff: webrtc/pc/createpeerconnectionfactory.cc

Issue 2961723004: Allow an external audio processing module to be used in WebRTC (Closed)
Patch Set: Moved creation of APMs from CreateVoiceEngines Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « webrtc/pc/DEPS ('k') | webrtc/pc/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h" 11 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h"
12 #include "webrtc/api/audio_codecs/builtin_audio_encoder_factory.h" 12 #include "webrtc/api/audio_codecs/builtin_audio_encoder_factory.h"
13 #include "webrtc/api/peerconnectioninterface.h" 13 #include "webrtc/api/peerconnectioninterface.h"
14 #include "webrtc/base/bind.h" 14 #include "webrtc/base/bind.h"
15 #include "webrtc/base/scoped_ref_ptr.h" 15 #include "webrtc/base/scoped_ref_ptr.h"
16 #include "webrtc/base/thread.h" 16 #include "webrtc/base/thread.h"
17 #include "webrtc/call/callfactoryinterface.h" 17 #include "webrtc/call/callfactoryinterface.h"
18 #include "webrtc/logging/rtc_event_log/rtc_event_log_factory_interface.h" 18 #include "webrtc/logging/rtc_event_log/rtc_event_log_factory_interface.h"
19 #include "webrtc/media/engine/webrtcmediaengine.h" 19 #include "webrtc/media/engine/webrtcmediaengine.h"
20 #include "webrtc/modules/audio_processing/include/audio_processing.h"
20 21
21 namespace webrtc { 22 namespace webrtc {
22 23
23 rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory( 24 rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
24 rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory, 25 rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,
25 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory) { 26 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory) {
26 return CreatePeerConnectionFactoryWithAudioMixer( 27 return CreatePeerConnectionFactoryWithAudioMixer(
27 nullptr /*network_thread*/, nullptr /*worker_thread*/, 28 nullptr /*network_thread*/, nullptr /*worker_thread*/,
28 nullptr /*signaling_thread*/, nullptr /*default_adm*/, 29 nullptr /*signaling_thread*/, nullptr /*default_adm*/,
29 audio_encoder_factory, audio_decoder_factory, 30 audio_encoder_factory, audio_decoder_factory,
(...skipping 16 matching lines...) Expand all
46 rtc::Thread* signaling_thread, 47 rtc::Thread* signaling_thread,
47 AudioDeviceModule* default_adm, 48 AudioDeviceModule* default_adm,
48 rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory, 49 rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,
49 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory, 50 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,
50 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, 51 cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
51 cricket::WebRtcVideoDecoderFactory* video_decoder_factory, 52 cricket::WebRtcVideoDecoderFactory* video_decoder_factory,
52 rtc::scoped_refptr<AudioMixer> audio_mixer) { 53 rtc::scoped_refptr<AudioMixer> audio_mixer) {
53 std::unique_ptr<cricket::MediaEngineInterface> media_engine( 54 std::unique_ptr<cricket::MediaEngineInterface> media_engine(
54 cricket::WebRtcMediaEngineFactory::Create( 55 cricket::WebRtcMediaEngineFactory::Create(
55 default_adm, audio_encoder_factory, audio_decoder_factory, 56 default_adm, audio_encoder_factory, audio_decoder_factory,
56 video_encoder_factory, video_decoder_factory, audio_mixer)); 57 video_encoder_factory, video_decoder_factory, audio_mixer,
58 AudioProcessing::Create()));
57 59
58 std::unique_ptr<CallFactoryInterface> call_factory = CreateCallFactory(); 60 std::unique_ptr<CallFactoryInterface> call_factory = CreateCallFactory();
59 61
60 std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory = 62 std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory =
61 CreateRtcEventLogFactory(); 63 CreateRtcEventLogFactory();
62 64
63 return CreateModularPeerConnectionFactory( 65 return CreateModularPeerConnectionFactory(
64 network_thread, worker_thread, signaling_thread, default_adm, 66 network_thread, worker_thread, signaling_thread, default_adm,
65 audio_encoder_factory, audio_decoder_factory, video_encoder_factory, 67 audio_encoder_factory, audio_decoder_factory, video_encoder_factory,
66 video_decoder_factory, audio_mixer, std::move(media_engine), 68 video_decoder_factory, audio_mixer, std::move(media_engine),
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory, 105 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,
104 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, 106 cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
105 cricket::WebRtcVideoDecoderFactory* video_decoder_factory) { 107 cricket::WebRtcVideoDecoderFactory* video_decoder_factory) {
106 return CreatePeerConnectionFactoryWithAudioMixer( 108 return CreatePeerConnectionFactoryWithAudioMixer(
107 network_thread, worker_thread, signaling_thread, default_adm, 109 network_thread, worker_thread, signaling_thread, default_adm,
108 audio_encoder_factory, audio_decoder_factory, video_encoder_factory, 110 audio_encoder_factory, audio_decoder_factory, video_encoder_factory,
109 video_decoder_factory, nullptr); 111 video_decoder_factory, nullptr);
110 } 112 }
111 113
112 } // namespace webrtc 114 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/pc/DEPS ('k') | webrtc/pc/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698