OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 LOG(LS_INFO) << "TCP candidates are disabled."; | 415 LOG(LS_INFO) << "TCP candidates are disabled."; |
416 } | 416 } |
417 | 417 |
418 port_allocator_->set_flags(portallocator_flags); | 418 port_allocator_->set_flags(portallocator_flags); |
419 // No step delay is used while allocating ports. | 419 // No step delay is used while allocating ports. |
420 port_allocator_->set_step_delay(cricket::kMinimumStepDelay); | 420 port_allocator_->set_step_delay(cricket::kMinimumStepDelay); |
421 | 421 |
422 mediastream_signaling_.reset(new MediaStreamSignaling( | 422 mediastream_signaling_.reset(new MediaStreamSignaling( |
423 factory_->signaling_thread(), this, factory_->channel_manager())); | 423 factory_->signaling_thread(), this, factory_->channel_manager())); |
424 | 424 |
425 session_.reset(new WebRtcSession(factory_->channel_manager(), | 425 session_.reset(new WebRtcSession( |
426 factory_->signaling_thread(), | 426 factory_->channel_manager(), factory_->signaling_thread(), |
427 factory_->worker_thread(), | 427 factory_->worker_thread(), port_allocator_.get(), |
428 port_allocator_.get(), | 428 mediastream_signaling_.get(), &call_factory_)); |
429 mediastream_signaling_.get())); | |
430 stats_.reset(new StatsCollector(session_.get())); | 429 stats_.reset(new StatsCollector(session_.get())); |
431 | 430 |
432 // Initialize the WebRtcSession. It creates transport channels etc. | 431 // Initialize the WebRtcSession. It creates transport channels etc. |
433 if (!session_->Initialize(factory_->options(), constraints, | 432 if (!session_->Initialize(factory_->options(), constraints, |
434 dtls_identity_store.Pass(), configuration)) | 433 dtls_identity_store.Pass(), configuration)) |
435 return false; | 434 return false; |
436 | 435 |
437 // Register PeerConnection as receiver of local ice candidates. | 436 // Register PeerConnection as receiver of local ice candidates. |
438 // All the callbacks will be posted to the application from PeerConnection. | 437 // All the callbacks will be posted to the application from PeerConnection. |
439 session_->RegisterIceObserver(this); | 438 session_->RegisterIceObserver(this); |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator | 1009 std::vector<rtc::scoped_refptr<RtpReceiverInterface>>::iterator |
1011 PeerConnection::FindReceiverForTrack(MediaStreamTrackInterface* track) { | 1010 PeerConnection::FindReceiverForTrack(MediaStreamTrackInterface* track) { |
1012 return std::find_if( | 1011 return std::find_if( |
1013 receivers_.begin(), receivers_.end(), | 1012 receivers_.begin(), receivers_.end(), |
1014 [track](const rtc::scoped_refptr<RtpReceiverInterface>& receiver) { | 1013 [track](const rtc::scoped_refptr<RtpReceiverInterface>& receiver) { |
1015 return receiver->track() == track; | 1014 return receiver->track() == track; |
1016 }); | 1015 }); |
1017 } | 1016 } |
1018 | 1017 |
1019 } // namespace webrtc | 1018 } // namespace webrtc |
OLD | NEW |