OLD | NEW |
---|---|
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 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory = | 67 std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory = |
68 CreateRtcEventLogFactory(); | 68 CreateRtcEventLogFactory(); |
69 | 69 |
70 return CreateModularPeerConnectionFactory( | 70 return CreateModularPeerConnectionFactory( |
71 network_thread, worker_thread, signaling_thread, default_adm, | 71 network_thread, worker_thread, signaling_thread, default_adm, |
72 audio_encoder_factory, audio_decoder_factory, video_encoder_factory, | 72 audio_encoder_factory, audio_decoder_factory, video_encoder_factory, |
73 video_decoder_factory, audio_mixer, std::move(media_engine), | 73 video_decoder_factory, audio_mixer, std::move(media_engine), |
74 std::move(call_factory), std::move(event_log_factory)); | 74 std::move(call_factory), std::move(event_log_factory)); |
75 } | 75 } |
76 | 76 |
77 rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory( | |
78 rtc::Thread* network_thread, | |
79 rtc::Thread* worker_thread, | |
80 rtc::Thread* signaling_thread, | |
81 rtc::scoped_refptr<AudioDeviceModule> default_adm, | |
82 rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory, | |
83 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory, | |
84 std::unique_ptr<VideoEncoderFactory> video_encoder_factory, | |
85 std::unique_ptr<VideoDecoderFactory> video_decoder_factory, | |
86 rtc::scoped_refptr<AudioMixer> audio_mixer, | |
87 rtc::scoped_refptr<AudioProcessing> audio_processing) { | |
88 if (!audio_processing) | |
89 audio_processing = AudioProcessing::Create(); | |
90 | |
91 std::unique_ptr<cricket::MediaEngineInterface> media_engine = | |
92 cricket::WebRtcMediaEngineFactory::Create( | |
93 default_adm, audio_encoder_factory, audio_decoder_factory, | |
94 std::move(video_encoder_factory), std::move(video_decoder_factory), | |
95 audio_mixer, audio_processing); | |
96 | |
97 std::unique_ptr<CallFactoryInterface> call_factory = CreateCallFactory(); | |
98 | |
99 std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory = | |
100 CreateRtcEventLogFactory(); | |
101 | |
102 return CreateModularPeerConnectionFactory( | |
103 network_thread, worker_thread, signaling_thread, default_adm, | |
104 audio_encoder_factory, audio_decoder_factory, | |
Taylor Brandstetter
2017/09/15 00:42:51
Something I'm realizing now: the audio_encoder_fac
magjed_webrtc
2017/09/15 13:39:16
Yeah, it looks strange but I haven't been working
| |
105 nullptr /* external_video_encoder_factory */, | |
106 nullptr /* external_video_decoder_factory */, audio_mixer, | |
107 std::move(media_engine), std::move(call_factory), | |
108 std::move(event_log_factory)); | |
109 } | |
110 | |
77 rtc::scoped_refptr<PeerConnectionFactoryInterface> | 111 rtc::scoped_refptr<PeerConnectionFactoryInterface> |
78 CreatePeerConnectionFactoryWithAudioMixer( | 112 CreatePeerConnectionFactoryWithAudioMixer( |
79 rtc::Thread* network_thread, | 113 rtc::Thread* network_thread, |
80 rtc::Thread* worker_thread, | 114 rtc::Thread* worker_thread, |
81 rtc::Thread* signaling_thread, | 115 rtc::Thread* signaling_thread, |
82 AudioDeviceModule* default_adm, | 116 AudioDeviceModule* default_adm, |
83 rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory, | 117 rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory, |
84 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory, | 118 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory, |
85 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, | 119 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, |
86 cricket::WebRtcVideoDecoderFactory* video_decoder_factory, | 120 cricket::WebRtcVideoDecoderFactory* video_decoder_factory, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
127 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory, | 161 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory, |
128 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, | 162 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, |
129 cricket::WebRtcVideoDecoderFactory* video_decoder_factory) { | 163 cricket::WebRtcVideoDecoderFactory* video_decoder_factory) { |
130 return CreatePeerConnectionFactoryWithAudioMixer( | 164 return CreatePeerConnectionFactoryWithAudioMixer( |
131 network_thread, worker_thread, signaling_thread, default_adm, | 165 network_thread, worker_thread, signaling_thread, default_adm, |
132 audio_encoder_factory, audio_decoder_factory, video_encoder_factory, | 166 audio_encoder_factory, audio_decoder_factory, video_encoder_factory, |
133 video_decoder_factory, nullptr); | 167 video_decoder_factory, nullptr); |
134 } | 168 } |
135 | 169 |
136 } // namespace webrtc | 170 } // namespace webrtc |
OLD | NEW |