OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 PeerConnectionTestWrapper::~PeerConnectionTestWrapper() {} | 69 PeerConnectionTestWrapper::~PeerConnectionTestWrapper() {} |
70 | 70 |
71 bool PeerConnectionTestWrapper::CreatePc( | 71 bool PeerConnectionTestWrapper::CreatePc( |
72 const MediaConstraintsInterface* constraints) { | 72 const MediaConstraintsInterface* constraints) { |
73 allocator_factory_ = webrtc::FakePortAllocatorFactory::Create(); | 73 allocator_factory_ = webrtc::FakePortAllocatorFactory::Create(); |
74 if (!allocator_factory_) { | 74 if (!allocator_factory_) { |
75 return false; | 75 return false; |
76 } | 76 } |
77 | 77 |
78 fake_audio_capture_module_ = FakeAudioCaptureModule::Create( | 78 fake_audio_capture_module_ = FakeAudioCaptureModule::Create(); |
79 rtc::Thread::Current()); | |
80 if (fake_audio_capture_module_ == NULL) { | 79 if (fake_audio_capture_module_ == NULL) { |
81 return false; | 80 return false; |
82 } | 81 } |
83 | 82 |
84 peer_connection_factory_ = webrtc::CreatePeerConnectionFactory( | 83 peer_connection_factory_ = webrtc::CreatePeerConnectionFactory( |
85 rtc::Thread::Current(), rtc::Thread::Current(), | 84 rtc::Thread::Current(), rtc::Thread::Current(), |
86 fake_audio_capture_module_, NULL, NULL); | 85 fake_audio_capture_module_, NULL, NULL); |
87 if (!peer_connection_factory_) { | 86 if (!peer_connection_factory_) { |
88 return false; | 87 return false; |
89 } | 88 } |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 peer_connection_factory_->CreateVideoSource( | 287 peer_connection_factory_->CreateVideoSource( |
289 new webrtc::FakePeriodicVideoCapturer(), &constraints); | 288 new webrtc::FakePeriodicVideoCapturer(), &constraints); |
290 std::string videotrack_label = label + kVideoTrackLabelBase; | 289 std::string videotrack_label = label + kVideoTrackLabelBase; |
291 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( | 290 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( |
292 peer_connection_factory_->CreateVideoTrack(videotrack_label, source)); | 291 peer_connection_factory_->CreateVideoTrack(videotrack_label, source)); |
293 | 292 |
294 stream->AddTrack(video_track); | 293 stream->AddTrack(video_track); |
295 } | 294 } |
296 return stream; | 295 return stream; |
297 } | 296 } |
OLD | NEW |