OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2013 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 69 } |
70 | 70 |
71 peer_connection_factory_ = webrtc::CreatePeerConnectionFactory( | 71 peer_connection_factory_ = webrtc::CreatePeerConnectionFactory( |
72 network_thread_, worker_thread_, rtc::Thread::Current(), | 72 network_thread_, worker_thread_, rtc::Thread::Current(), |
73 fake_audio_capture_module_, NULL, NULL); | 73 fake_audio_capture_module_, NULL, NULL); |
74 if (!peer_connection_factory_) { | 74 if (!peer_connection_factory_) { |
75 return false; | 75 return false; |
76 } | 76 } |
77 | 77 |
78 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator( | 78 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator( |
79 rtc::SSLStreamAdapter::HaveDtlsSrtp() ? new FakeRTCCertificateGenerator() | 79 new FakeRTCCertificateGenerator()); |
80 : nullptr); | |
81 peer_connection_ = peer_connection_factory_->CreatePeerConnection( | 80 peer_connection_ = peer_connection_factory_->CreatePeerConnection( |
82 config, constraints, std::move(port_allocator), std::move(cert_generator), | 81 config, constraints, std::move(port_allocator), std::move(cert_generator), |
83 this); | 82 this); |
84 | 83 |
85 return peer_connection_.get() != NULL; | 84 return peer_connection_.get() != NULL; |
86 } | 85 } |
87 | 86 |
88 rtc::scoped_refptr<webrtc::DataChannelInterface> | 87 rtc::scoped_refptr<webrtc::DataChannelInterface> |
89 PeerConnectionTestWrapper::CreateDataChannel( | 88 PeerConnectionTestWrapper::CreateDataChannel( |
90 const std::string& label, | 89 const std::string& label, |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 peer_connection_factory_->CreateVideoSource( | 271 peer_connection_factory_->CreateVideoSource( |
273 new webrtc::FakePeriodicVideoCapturer(), &constraints); | 272 new webrtc::FakePeriodicVideoCapturer(), &constraints); |
274 std::string videotrack_label = label + kVideoTrackLabelBase; | 273 std::string videotrack_label = label + kVideoTrackLabelBase; |
275 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( | 274 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( |
276 peer_connection_factory_->CreateVideoTrack(videotrack_label, source)); | 275 peer_connection_factory_->CreateVideoTrack(videotrack_label, source)); |
277 | 276 |
278 stream->AddTrack(video_track); | 277 stream->AddTrack(video_track); |
279 } | 278 } |
280 return stream; | 279 return stream; |
281 } | 280 } |
OLD | NEW |