| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004--2011 Google Inc. | 3 * Copyright 2004--2011 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 DCHECK(signaling_thread_->IsCurrent()); | 199 DCHECK(signaling_thread_->IsCurrent()); |
| 200 return channel_manager_->StartAecDump(file); | 200 return channel_manager_->StartAecDump(file); |
| 201 } | 201 } |
| 202 | 202 |
| 203 rtc::scoped_refptr<PeerConnectionInterface> | 203 rtc::scoped_refptr<PeerConnectionInterface> |
| 204 PeerConnectionFactory::CreatePeerConnection( | 204 PeerConnectionFactory::CreatePeerConnection( |
| 205 const PeerConnectionInterface::RTCConfiguration& configuration, | 205 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 206 const MediaConstraintsInterface* constraints, | 206 const MediaConstraintsInterface* constraints, |
| 207 PortAllocatorFactoryInterface* allocator_factory, | 207 PortAllocatorFactoryInterface* allocator_factory, |
| 208 DTLSIdentityServiceInterface* dtls_identity_service, | 208 DTLSIdentityServiceInterface* dtls_identity_service, |
| 209 rtc::scoped_refptr<DtlsCertificate> certificate, |
| 209 PeerConnectionObserver* observer) { | 210 PeerConnectionObserver* observer) { |
| 210 DCHECK(signaling_thread_->IsCurrent()); | 211 DCHECK(signaling_thread_->IsCurrent()); |
| 211 DCHECK(allocator_factory || default_allocator_factory_); | 212 DCHECK(allocator_factory || default_allocator_factory_); |
| 212 | 213 |
| 213 if (!dtls_identity_service) { | 214 if (!dtls_identity_service && !certificate.get()) { |
| 214 dtls_identity_service = new DtlsIdentityService(dtls_identity_store_.get()); | 215 dtls_identity_service = new DtlsIdentityService(dtls_identity_store_.get()); |
| 215 } | 216 } |
| 216 | 217 |
| 217 PortAllocatorFactoryInterface* chosen_allocator_factory = | 218 PortAllocatorFactoryInterface* chosen_allocator_factory = |
| 218 allocator_factory ? allocator_factory : default_allocator_factory_.get(); | 219 allocator_factory ? allocator_factory : default_allocator_factory_.get(); |
| 219 chosen_allocator_factory->SetNetworkIgnoreMask(options_.network_ignore_mask); | 220 chosen_allocator_factory->SetNetworkIgnoreMask(options_.network_ignore_mask); |
| 220 | 221 |
| 221 rtc::scoped_refptr<PeerConnection> pc( | 222 rtc::scoped_refptr<PeerConnection> pc( |
| 222 new rtc::RefCountedObject<PeerConnection>(this)); | 223 new rtc::RefCountedObject<PeerConnection>(this)); |
| 223 if (!pc->Initialize( | 224 if (!pc->Initialize( |
| 224 configuration, | 225 configuration, |
| 225 constraints, | 226 constraints, |
| 226 chosen_allocator_factory, | 227 chosen_allocator_factory, |
| 227 dtls_identity_service, | 228 dtls_identity_service, |
| 229 certificate, |
| 228 observer)) { | 230 observer)) { |
| 229 return NULL; | 231 return NULL; |
| 230 } | 232 } |
| 231 return PeerConnectionProxy::Create(signaling_thread(), pc); | 233 return PeerConnectionProxy::Create(signaling_thread(), pc); |
| 232 } | 234 } |
| 233 | 235 |
| 234 rtc::scoped_refptr<MediaStreamInterface> | 236 rtc::scoped_refptr<MediaStreamInterface> |
| 235 PeerConnectionFactory::CreateLocalMediaStream(const std::string& label) { | 237 PeerConnectionFactory::CreateLocalMediaStream(const std::string& label) { |
| 236 DCHECK(signaling_thread_->IsCurrent()); | 238 DCHECK(signaling_thread_->IsCurrent()); |
| 237 return MediaStreamProxy::Create(signaling_thread_, | 239 return MediaStreamProxy::Create(signaling_thread_, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 } | 276 } |
| 275 | 277 |
| 276 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { | 278 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { |
| 277 ASSERT(worker_thread_ == rtc::Thread::Current()); | 279 ASSERT(worker_thread_ == rtc::Thread::Current()); |
| 278 return cricket::WebRtcMediaEngineFactory::Create( | 280 return cricket::WebRtcMediaEngineFactory::Create( |
| 279 default_adm_.get(), video_encoder_factory_.get(), | 281 default_adm_.get(), video_encoder_factory_.get(), |
| 280 video_decoder_factory_.get()); | 282 video_decoder_factory_.get()); |
| 281 } | 283 } |
| 282 | 284 |
| 283 } // namespace webrtc | 285 } // namespace webrtc |
| OLD | NEW |