| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 void PeerConnectionFactory::StopRtcEventLog() { | 243 void PeerConnectionFactory::StopRtcEventLog() { |
| 244 RTC_DCHECK(signaling_thread_->IsCurrent()); | 244 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 245 channel_manager_->StopRtcEventLog(); | 245 channel_manager_->StopRtcEventLog(); |
| 246 } | 246 } |
| 247 | 247 |
| 248 rtc::scoped_refptr<PeerConnectionInterface> | 248 rtc::scoped_refptr<PeerConnectionInterface> |
| 249 PeerConnectionFactory::CreatePeerConnection( | 249 PeerConnectionFactory::CreatePeerConnection( |
| 250 const PeerConnectionInterface::RTCConfiguration& configuration_in, | 250 const PeerConnectionInterface::RTCConfiguration& configuration_in, |
| 251 const MediaConstraintsInterface* constraints, | 251 const MediaConstraintsInterface* constraints, |
| 252 rtc::scoped_ptr<cricket::PortAllocator> allocator, | 252 std::unique_ptr<cricket::PortAllocator> allocator, |
| 253 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 253 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 254 PeerConnectionObserver* observer) { | 254 PeerConnectionObserver* observer) { |
| 255 RTC_DCHECK(signaling_thread_->IsCurrent()); | 255 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 256 | 256 |
| 257 // We merge constraints and configuration into a single configuration. | 257 // We merge constraints and configuration into a single configuration. |
| 258 PeerConnectionInterface::RTCConfiguration configuration = configuration_in; | 258 PeerConnectionInterface::RTCConfiguration configuration = configuration_in; |
| 259 CopyConstraintsIntoRtcConfiguration(constraints, &configuration); | 259 CopyConstraintsIntoRtcConfiguration(constraints, &configuration); |
| 260 | 260 |
| 261 return CreatePeerConnection(configuration, std::move(allocator), | 261 return CreatePeerConnection(configuration, std::move(allocator), |
| 262 std::move(dtls_identity_store), observer); | 262 std::move(dtls_identity_store), observer); |
| 263 } | 263 } |
| 264 | 264 |
| 265 rtc::scoped_refptr<PeerConnectionInterface> | 265 rtc::scoped_refptr<PeerConnectionInterface> |
| 266 PeerConnectionFactory::CreatePeerConnection( | 266 PeerConnectionFactory::CreatePeerConnection( |
| 267 const PeerConnectionInterface::RTCConfiguration& configuration, | 267 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 268 rtc::scoped_ptr<cricket::PortAllocator> allocator, | 268 std::unique_ptr<cricket::PortAllocator> allocator, |
| 269 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 269 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 270 PeerConnectionObserver* observer) { | 270 PeerConnectionObserver* observer) { |
| 271 RTC_DCHECK(signaling_thread_->IsCurrent()); | 271 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 272 | 272 |
| 273 if (!dtls_identity_store.get()) { | 273 if (!dtls_identity_store.get()) { |
| 274 // Because |pc|->Initialize takes ownership of the store we need a new | 274 // Because |pc|->Initialize takes ownership of the store we need a new |
| 275 // wrapper object that can be deleted without deleting the underlying | 275 // wrapper object that can be deleted without deleting the underlying |
| 276 // |dtls_identity_store_|, protecting it from being deleted multiple times. | 276 // |dtls_identity_store_|, protecting it from being deleted multiple times. |
| 277 dtls_identity_store.reset( | 277 dtls_identity_store.reset( |
| 278 new DtlsIdentityStoreWrapper(dtls_identity_store_)); | 278 new DtlsIdentityStoreWrapper(dtls_identity_store_)); |
| 279 } | 279 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 } | 337 } |
| 338 | 338 |
| 339 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { | 339 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { |
| 340 ASSERT(worker_thread_ == rtc::Thread::Current()); | 340 ASSERT(worker_thread_ == rtc::Thread::Current()); |
| 341 return cricket::WebRtcMediaEngineFactory::Create( | 341 return cricket::WebRtcMediaEngineFactory::Create( |
| 342 default_adm_.get(), video_encoder_factory_.get(), | 342 default_adm_.get(), video_encoder_factory_.get(), |
| 343 video_decoder_factory_.get()); | 343 video_decoder_factory_.get()); |
| 344 } | 344 } |
| 345 | 345 |
| 346 } // namespace webrtc | 346 } // namespace webrtc |
| OLD | NEW |