Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Side by Side Diff: webrtc/test/call_test.cc

Issue 1674413004: Added A/V sync tests with drifting clocks. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/test/call_test.h ('k') | webrtc/test/drifting_clock.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 speed) {
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 * speed, 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
246 void CallTest::CreateFakeAudioDevices() { 254 void CallTest::CreateFakeAudioDevices() {
247 fake_send_audio_device_.reset(new FakeAudioDevice( 255 fake_send_audio_device_.reset(new FakeAudioDevice(
248 clock_, test::ResourcePath("voice_engine/audio_long16", "pcm"))); 256 clock_, test::ResourcePath("voice_engine/audio_long16", "pcm"),
257 DriftingClock::kNoDrift));
249 fake_recv_audio_device_.reset(new FakeAudioDevice( 258 fake_recv_audio_device_.reset(new FakeAudioDevice(
250 clock_, test::ResourcePath("voice_engine/audio_long16", "pcm"))); 259 clock_, test::ResourcePath("voice_engine/audio_long16", "pcm"),
260 DriftingClock::kNoDrift));
251 } 261 }
252 262
253 void CallTest::CreateVideoStreams() { 263 void CallTest::CreateVideoStreams() {
254 RTC_DCHECK(video_send_stream_ == nullptr); 264 RTC_DCHECK(video_send_stream_ == nullptr);
255 RTC_DCHECK(video_receive_streams_.empty()); 265 RTC_DCHECK(video_receive_streams_.empty());
256 RTC_DCHECK(audio_send_stream_ == nullptr); 266 RTC_DCHECK(audio_send_stream_ == nullptr);
257 RTC_DCHECK(audio_receive_streams_.empty()); 267 RTC_DCHECK(audio_receive_streams_.empty());
258 268
259 video_send_stream_ = sender_call_->CreateVideoSendStream( 269 video_send_stream_ = sender_call_->CreateVideoSendStream(
260 video_send_config_, video_encoder_config_); 270 video_send_config_, video_encoder_config_);
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 445
436 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) { 446 EndToEndTest::EndToEndTest(unsigned int timeout_ms) : BaseTest(timeout_ms) {
437 } 447 }
438 448
439 bool EndToEndTest::ShouldCreateReceivers() const { 449 bool EndToEndTest::ShouldCreateReceivers() const {
440 return true; 450 return true;
441 } 451 }
442 452
443 } // namespace test 453 } // namespace test
444 } // namespace webrtc 454 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/call_test.h ('k') | webrtc/test/drifting_clock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698