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 #include "webrtc/base/checks.h" | 10 #include "webrtc/base/checks.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 RTC_DCHECK(voe_send_.channel_id >= 0); | 229 RTC_DCHECK(voe_send_.channel_id >= 0); |
230 AudioReceiveStream::Config audio_config; | 230 AudioReceiveStream::Config audio_config; |
231 audio_config.rtp.local_ssrc = kReceiverLocalAudioSsrc; | 231 audio_config.rtp.local_ssrc = kReceiverLocalAudioSsrc; |
232 audio_config.rtcp_send_transport = rtcp_send_transport; | 232 audio_config.rtcp_send_transport = rtcp_send_transport; |
233 audio_config.voe_channel_id = voe_recv_.channel_id; | 233 audio_config.voe_channel_id = voe_recv_.channel_id; |
234 audio_config.rtp.remote_ssrc = audio_send_config_.rtp.ssrc; | 234 audio_config.rtp.remote_ssrc = audio_send_config_.rtp.ssrc; |
235 audio_receive_configs_.push_back(audio_config); | 235 audio_receive_configs_.push_back(audio_config); |
236 } | 236 } |
237 } | 237 } |
238 | 238 |
239 void CallTest::CreateFrameGeneratorCapturerWithDrift(Clock* clock, | |
240 float drift) { | |
241 VideoStream stream = video_encoder_config_.streams.back(); | |
242 frame_generator_capturer_.reset(test::FrameGeneratorCapturer::Create( | |
243 video_send_stream_->Input(), stream.width, stream.height, | |
244 stream.max_framerate / (1. + drift), clock)); | |
245 } | |
246 | |
239 void CallTest::CreateFrameGeneratorCapturer() { | 247 void CallTest::CreateFrameGeneratorCapturer() { |
240 VideoStream stream = video_encoder_config_.streams.back(); | 248 VideoStream stream = video_encoder_config_.streams.back(); |
241 frame_generator_capturer_.reset(test::FrameGeneratorCapturer::Create( | 249 frame_generator_capturer_.reset(test::FrameGeneratorCapturer::Create( |
242 video_send_stream_->Input(), stream.width, stream.height, | 250 video_send_stream_->Input(), stream.width, stream.height, |
243 stream.max_framerate, clock_)); | 251 stream.max_framerate, clock_)); |
244 } | 252 } |
245 | 253 |
254 void CallTest::CreateFakeAudioDevicesWithDrift(float drift) { | |
255 fake_send_audio_device_.reset(new FakeAudioDevice( | |
256 clock_, test::ResourcePath("voice_engine/audio_long16", "pcm"), drift)); | |
257 fake_recv_audio_device_.reset(new FakeAudioDevice( | |
258 clock_, test::ResourcePath("voice_engine/audio_long16", "pcm"), 0)); | |
stefan-webrtc
2016/02/09 14:02:20
This always overwrites the drifting device
danilchap
2016/02/09 14:56:49
oops, didn't notice this function is not used.
| |
259 } | |
260 | |
246 void CallTest::CreateFakeAudioDevices() { | 261 void CallTest::CreateFakeAudioDevices() { |
247 fake_send_audio_device_.reset(new FakeAudioDevice( | 262 fake_send_audio_device_.reset(new FakeAudioDevice( |
248 clock_, test::ResourcePath("voice_engine/audio_long16", "pcm"))); | 263 clock_, test::ResourcePath("voice_engine/audio_long16", "pcm"), 0)); |
249 fake_recv_audio_device_.reset(new FakeAudioDevice( | 264 fake_recv_audio_device_.reset(new FakeAudioDevice( |
250 clock_, test::ResourcePath("voice_engine/audio_long16", "pcm"))); | 265 clock_, test::ResourcePath("voice_engine/audio_long16", "pcm"), 0)); |
251 } | 266 } |
252 | 267 |
253 void CallTest::CreateVideoStreams() { | 268 void CallTest::CreateVideoStreams() { |
254 RTC_DCHECK(video_send_stream_ == nullptr); | 269 RTC_DCHECK(video_send_stream_ == nullptr); |
255 RTC_DCHECK(video_receive_streams_.empty()); | 270 RTC_DCHECK(video_receive_streams_.empty()); |
256 RTC_DCHECK(audio_send_stream_ == nullptr); | 271 RTC_DCHECK(audio_send_stream_ == nullptr); |
257 RTC_DCHECK(audio_receive_streams_.empty()); | 272 RTC_DCHECK(audio_receive_streams_.empty()); |
258 | 273 |
259 video_send_stream_ = sender_call_->CreateVideoSendStream( | 274 video_send_stream_ = sender_call_->CreateVideoSendStream( |
260 video_send_config_, video_encoder_config_); | 275 video_send_config_, video_encoder_config_); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
435 | 450 |
436 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { | 451 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { |
437 } | 452 } |
438 | 453 |
439 bool EndToEndTest::ShouldCreateReceivers() const { | 454 bool EndToEndTest::ShouldCreateReceivers() const { |
440 return true; | 455 return true; |
441 } | 456 } |
442 | 457 |
443 } // namespace test | 458 } // namespace test |
444 } // namespace webrtc | 459 } // namespace webrtc |
OLD | NEW |