| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 rtc::Thread* network_thread, | 52 rtc::Thread* network_thread, |
| 53 rtc::Thread* worker_thread) | 53 rtc::Thread* worker_thread) |
| 54 : name_(name), | 54 : name_(name), |
| 55 network_thread_(network_thread), | 55 network_thread_(network_thread), |
| 56 worker_thread_(worker_thread) {} | 56 worker_thread_(worker_thread) {} |
| 57 | 57 |
| 58 PeerConnectionTestWrapper::~PeerConnectionTestWrapper() {} | 58 PeerConnectionTestWrapper::~PeerConnectionTestWrapper() {} |
| 59 | 59 |
| 60 bool PeerConnectionTestWrapper::CreatePc( | 60 bool PeerConnectionTestWrapper::CreatePc( |
| 61 const MediaConstraintsInterface* constraints, | 61 const MediaConstraintsInterface* constraints, |
| 62 const webrtc::PeerConnectionInterface::RTCConfiguration& config) { | 62 const webrtc::PeerConnectionInterface::RTCConfiguration& config, |
| 63 rtc::scoped_refptr<webrtc::AudioEncoderFactory> audio_encoder_factory, |
| 64 rtc::scoped_refptr<webrtc::AudioDecoderFactory> audio_decoder_factory) { |
| 63 std::unique_ptr<cricket::PortAllocator> port_allocator( | 65 std::unique_ptr<cricket::PortAllocator> port_allocator( |
| 64 new cricket::FakePortAllocator(network_thread_, nullptr)); | 66 new cricket::FakePortAllocator(network_thread_, nullptr)); |
| 65 | 67 |
| 66 fake_audio_capture_module_ = FakeAudioCaptureModule::Create(); | 68 fake_audio_capture_module_ = FakeAudioCaptureModule::Create(); |
| 67 if (fake_audio_capture_module_ == NULL) { | 69 if (fake_audio_capture_module_ == NULL) { |
| 68 return false; | 70 return false; |
| 69 } | 71 } |
| 70 | 72 |
| 71 peer_connection_factory_ = webrtc::CreatePeerConnectionFactory( | 73 peer_connection_factory_ = webrtc::CreatePeerConnectionFactory( |
| 72 network_thread_, worker_thread_, rtc::Thread::Current(), | 74 network_thread_, worker_thread_, rtc::Thread::Current(), |
| 73 fake_audio_capture_module_, NULL, NULL); | 75 fake_audio_capture_module_, audio_encoder_factory, audio_decoder_factory, |
| 76 nullptr, nullptr); |
| 74 if (!peer_connection_factory_) { | 77 if (!peer_connection_factory_) { |
| 75 return false; | 78 return false; |
| 76 } | 79 } |
| 77 | 80 |
| 78 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator( | 81 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator( |
| 79 new FakeRTCCertificateGenerator()); | 82 new FakeRTCCertificateGenerator()); |
| 80 peer_connection_ = peer_connection_factory_->CreatePeerConnection( | 83 peer_connection_ = peer_connection_factory_->CreatePeerConnection( |
| 81 config, constraints, std::move(port_allocator), std::move(cert_generator), | 84 config, constraints, std::move(port_allocator), std::move(cert_generator), |
| 82 this); | 85 this); |
| 83 | 86 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 new webrtc::FakePeriodicVideoCapturer()), | 276 new webrtc::FakePeriodicVideoCapturer()), |
| 274 &constraints); | 277 &constraints); |
| 275 std::string videotrack_label = label + kVideoTrackLabelBase; | 278 std::string videotrack_label = label + kVideoTrackLabelBase; |
| 276 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( | 279 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( |
| 277 peer_connection_factory_->CreateVideoTrack(videotrack_label, source)); | 280 peer_connection_factory_->CreateVideoTrack(videotrack_label, source)); |
| 278 | 281 |
| 279 stream->AddTrack(video_track); | 282 stream->AddTrack(video_track); |
| 280 } | 283 } |
| 281 return stream; | 284 return stream; |
| 282 } | 285 } |
| OLD | NEW |