| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 std::unique_ptr<CallFactoryInterface> call_factory(CreateCallFactory()); | 190 std::unique_ptr<CallFactoryInterface> call_factory(CreateCallFactory()); |
| 191 std::unique_ptr<RtcEventLogFactoryInterface> rtc_event_log_factory( | 191 std::unique_ptr<RtcEventLogFactoryInterface> rtc_event_log_factory( |
| 192 CreateRtcEventLogFactory()); | 192 CreateRtcEventLogFactory()); |
| 193 std::unique_ptr<cricket::MediaEngineInterface> media_engine(CreateMediaEngine( | 193 std::unique_ptr<cricket::MediaEngineInterface> media_engine(CreateMediaEngine( |
| 194 adm, audio_encoder_factory, audio_decoder_factory, video_encoder_factory, | 194 adm, audio_encoder_factory, audio_decoder_factory, video_encoder_factory, |
| 195 video_decoder_factory, audio_mixer)); | 195 video_decoder_factory, audio_mixer)); |
| 196 | 196 |
| 197 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( | 197 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( |
| 198 CreateModularPeerConnectionFactory( | 198 CreateModularPeerConnectionFactory( |
| 199 network_thread.get(), worker_thread.get(), signaling_thread.get(), | 199 network_thread.get(), worker_thread.get(), signaling_thread.get(), |
| 200 adm, audio_encoder_factory, audio_decoder_factory, | 200 video_encoder_factory, video_decoder_factory, std::move(media_engine), |
| 201 video_encoder_factory, video_decoder_factory, audio_mixer, | 201 std::move(call_factory), std::move(rtc_event_log_factory))); |
| 202 std::move(media_engine), std::move(call_factory), | |
| 203 std::move(rtc_event_log_factory))); | |
| 204 RTC_CHECK(factory) << "Failed to create the peer connection factory; " | 202 RTC_CHECK(factory) << "Failed to create the peer connection factory; " |
| 205 << "WebRTC/libjingle init likely failed on this device"; | 203 << "WebRTC/libjingle init likely failed on this device"; |
| 206 // TODO(honghaiz): Maybe put the options as the argument of | 204 // TODO(honghaiz): Maybe put the options as the argument of |
| 207 // CreatePeerConnectionFactory. | 205 // CreatePeerConnectionFactory. |
| 208 if (has_options) { | 206 if (has_options) { |
| 209 factory->SetOptions(options); | 207 factory->SetOptions(options); |
| 210 } | 208 } |
| 211 OwnedFactoryAndThreads* owned_factory = new OwnedFactoryAndThreads( | 209 OwnedFactoryAndThreads* owned_factory = new OwnedFactoryAndThreads( |
| 212 std::move(network_thread), std::move(worker_thread), | 210 std::move(network_thread), std::move(worker_thread), |
| 213 std::move(signaling_thread), video_encoder_factory, video_decoder_factory, | 211 std::move(signaling_thread), video_encoder_factory, video_decoder_factory, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 reinterpret_cast<PeerConnectionObserverJni*>(observer_p); | 366 reinterpret_cast<PeerConnectionObserverJni*>(observer_p); |
| 369 observer->SetConstraints(new MediaConstraintsJni(jni, j_constraints)); | 367 observer->SetConstraints(new MediaConstraintsJni(jni, j_constraints)); |
| 370 CopyConstraintsIntoRtcConfiguration(observer->constraints(), &rtc_config); | 368 CopyConstraintsIntoRtcConfiguration(observer->constraints(), &rtc_config); |
| 371 rtc::scoped_refptr<PeerConnectionInterface> pc( | 369 rtc::scoped_refptr<PeerConnectionInterface> pc( |
| 372 f->CreatePeerConnection(rtc_config, nullptr, nullptr, observer)); | 370 f->CreatePeerConnection(rtc_config, nullptr, nullptr, observer)); |
| 373 return (jlong)pc.release(); | 371 return (jlong)pc.release(); |
| 374 } | 372 } |
| 375 | 373 |
| 376 } // namespace jni | 374 } // namespace jni |
| 377 } // namespace webrtc | 375 } // namespace webrtc |
| OLD | NEW |