OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 test->ModifyVideoCaptureStartResolution(&width, &height, &frame_rate); | 146 test->ModifyVideoCaptureStartResolution(&width, &height, &frame_rate); |
147 CreateFrameGeneratorCapturer(frame_rate, width, height); | 147 CreateFrameGeneratorCapturer(frame_rate, width, height); |
148 test->OnFrameGeneratorCapturerCreated(frame_generator_capturer_.get()); | 148 test->OnFrameGeneratorCapturerCreated(frame_generator_capturer_.get()); |
149 } | 149 } |
150 | 150 |
151 Start(); | 151 Start(); |
152 }); | 152 }); |
153 | 153 |
154 test->PerformTest(); | 154 test->PerformTest(); |
155 | 155 |
156 task_queue_.SendTask([this]() { | 156 task_queue_.SendTask([this, test]() { |
kwiberg-webrtc
2017/09/13 14:20:26
The lambda is capturing test by value, i.e. making
the sun
2017/09/13 14:53:33
test is a pointer and CallTest owns the TQ, so thi
kwiberg-webrtc
2017/09/14 01:26:40
Acknowledged.
| |
157 Stop(); | 157 Stop(); |
158 test->OnStreamsStopped(); | |
158 DestroyStreams(); | 159 DestroyStreams(); |
159 send_transport_.reset(); | 160 send_transport_.reset(); |
160 receive_transport_.reset(); | 161 receive_transport_.reset(); |
161 DestroyCalls(); | 162 DestroyCalls(); |
162 if (num_audio_streams_ > 0) | 163 if (num_audio_streams_ > 0) |
163 DestroyVoiceEngines(); | 164 DestroyVoiceEngines(); |
164 }); | 165 }); |
165 | |
166 test->OnTestFinished(); | |
167 } | 166 } |
168 | 167 |
169 void CallTest::CreateCalls(const Call::Config& sender_config, | 168 void CallTest::CreateCalls(const Call::Config& sender_config, |
170 const Call::Config& receiver_config) { | 169 const Call::Config& receiver_config) { |
171 CreateSenderCall(sender_config); | 170 CreateSenderCall(sender_config); |
172 CreateReceiverCall(receiver_config); | 171 CreateReceiverCall(receiver_config); |
173 } | 172 } |
174 | 173 |
175 void CallTest::CreateSenderCall(const Call::Config& config) { | 174 void CallTest::CreateSenderCall(const Call::Config& config) { |
176 sender_call_transport_controller_ = new RtpTransportControllerSend( | 175 sender_call_transport_controller_ = new RtpTransportControllerSend( |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
583 void BaseTest::ModifyFlexfecConfigs( | 582 void BaseTest::ModifyFlexfecConfigs( |
584 std::vector<FlexfecReceiveStream::Config>* receive_configs) {} | 583 std::vector<FlexfecReceiveStream::Config>* receive_configs) {} |
585 | 584 |
586 void BaseTest::OnFlexfecStreamsCreated( | 585 void BaseTest::OnFlexfecStreamsCreated( |
587 const std::vector<FlexfecReceiveStream*>& receive_streams) {} | 586 const std::vector<FlexfecReceiveStream*>& receive_streams) {} |
588 | 587 |
589 void BaseTest::OnFrameGeneratorCapturerCreated( | 588 void BaseTest::OnFrameGeneratorCapturerCreated( |
590 FrameGeneratorCapturer* frame_generator_capturer) { | 589 FrameGeneratorCapturer* frame_generator_capturer) { |
591 } | 590 } |
592 | 591 |
593 void BaseTest::OnTestFinished() { | 592 void BaseTest::OnStreamsStopped() { |
594 } | 593 } |
595 | 594 |
596 SendTest::SendTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { | 595 SendTest::SendTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { |
597 } | 596 } |
598 | 597 |
599 bool SendTest::ShouldCreateReceivers() const { | 598 bool SendTest::ShouldCreateReceivers() const { |
600 return false; | 599 return false; |
601 } | 600 } |
602 | 601 |
603 EndToEndTest::EndToEndTest() {} | 602 EndToEndTest::EndToEndTest() {} |
604 | 603 |
605 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { | 604 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { |
606 } | 605 } |
607 | 606 |
608 bool EndToEndTest::ShouldCreateReceivers() const { | 607 bool EndToEndTest::ShouldCreateReceivers() const { |
609 return true; | 608 return true; |
610 } | 609 } |
611 | 610 |
612 } // namespace test | 611 } // namespace test |
613 } // namespace webrtc | 612 } // namespace webrtc |
OLD | NEW |