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 |
11 #include "webrtc/test/call_test.h" | 11 #include "webrtc/test/call_test.h" |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 | 14 |
15 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h" | 15 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h" |
16 #include "webrtc/api/audio_codecs/builtin_audio_encoder_factory.h" | 16 #include "webrtc/api/audio_codecs/builtin_audio_encoder_factory.h" |
17 #include "webrtc/base/checks.h" | 17 #include "webrtc/base/checks.h" |
| 18 #include "webrtc/base/ptr_util.h" |
18 #include "webrtc/config.h" | 19 #include "webrtc/config.h" |
19 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h" | 20 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h" |
20 #include "webrtc/test/testsupport/fileutils.h" | 21 #include "webrtc/test/testsupport/fileutils.h" |
21 #include "webrtc/voice_engine/include/voe_base.h" | 22 #include "webrtc/voice_engine/include/voe_base.h" |
22 | 23 |
23 namespace webrtc { | 24 namespace webrtc { |
24 namespace test { | 25 namespace test { |
25 | 26 |
26 namespace { | 27 namespace { |
27 const int kVideoRotationRtpExtensionId = 4; | 28 const int kVideoRotationRtpExtensionId = 4; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 if (video_send_stream_) | 174 if (video_send_stream_) |
174 video_send_stream_->Stop(); | 175 video_send_stream_->Stop(); |
175 } | 176 } |
176 | 177 |
177 void CallTest::CreateCalls(const Call::Config& sender_config, | 178 void CallTest::CreateCalls(const Call::Config& sender_config, |
178 const Call::Config& receiver_config) { | 179 const Call::Config& receiver_config) { |
179 CreateSenderCall(sender_config); | 180 CreateSenderCall(sender_config); |
180 CreateReceiverCall(receiver_config); | 181 CreateReceiverCall(receiver_config); |
181 } | 182 } |
182 | 183 |
183 void CallTest::CreateSenderCall(const Call::Config& config) { | 184 void CallTest::CreateSenderCall(Call::Config config) { |
| 185 sender_call_.reset(); |
| 186 // Inject the RtpTransportController objects. |
| 187 sender_rtp_transport_send_ = rtc::MakeUnique<RtpTransportControllerSend>( |
| 188 clock_, config.event_log); |
| 189 config.video_rtp_transport_send = sender_rtp_transport_send_.get(); |
| 190 config.audio_rtp_transport_send = sender_rtp_transport_send_.get(); |
| 191 config.send_side_cc = sender_rtp_transport_send_->send_side_cc(); |
184 sender_call_.reset(Call::Create(config)); | 192 sender_call_.reset(Call::Create(config)); |
185 } | 193 } |
186 | 194 |
187 void CallTest::CreateReceiverCall(const Call::Config& config) { | 195 void CallTest::CreateReceiverCall(Call::Config config) { |
| 196 receiver_call_.reset(); |
| 197 // Inject the RtpTransportController objects. |
| 198 receiver_rtp_transport_send_ = rtc::MakeUnique<RtpTransportControllerSend>( |
| 199 clock_, config.event_log); |
| 200 config.video_rtp_transport_send = receiver_rtp_transport_send_.get(); |
| 201 config.audio_rtp_transport_send = receiver_rtp_transport_send_.get(); |
| 202 config.send_side_cc = receiver_rtp_transport_send_->send_side_cc(); |
188 receiver_call_.reset(Call::Create(config)); | 203 receiver_call_.reset(Call::Create(config)); |
189 } | 204 } |
190 | 205 |
191 void CallTest::DestroyCalls() { | 206 void CallTest::DestroyCalls() { |
192 sender_call_.reset(); | 207 sender_call_.reset(); |
193 receiver_call_.reset(); | 208 receiver_call_.reset(); |
194 } | 209 } |
195 | 210 |
196 void CallTest::CreateSendConfig(size_t num_video_streams, | 211 void CallTest::CreateSendConfig(size_t num_video_streams, |
197 size_t num_audio_streams, | 212 size_t num_audio_streams, |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 | 558 |
544 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { | 559 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { |
545 } | 560 } |
546 | 561 |
547 bool EndToEndTest::ShouldCreateReceivers() const { | 562 bool EndToEndTest::ShouldCreateReceivers() const { |
548 return true; | 563 return true; |
549 } | 564 } |
550 | 565 |
551 } // namespace test | 566 } // namespace test |
552 } // namespace webrtc | 567 } // namespace webrtc |
OLD | NEW |