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

Unified Diff: webrtc/call/call_perf_tests.cc

Issue 2652803002: Refactor FakeAudioDevice to have separate methods for starting recording and playout. (Closed)
Patch Set: Moved initialization to ctor. Made StartRecording and StartPlayout to private. Fixed call_test Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/call/call_perf_tests.cc
diff --git a/webrtc/call/call_perf_tests.cc b/webrtc/call/call_perf_tests.cc
index 782b45c9f273ffd6fe180fa59a2b49d2d5d914ee..6a21c62426726962502452a029f037ca1d77a1e8 100644
--- a/webrtc/call/call_perf_tests.cc
+++ b/webrtc/call/call_perf_tests.cc
@@ -146,11 +146,7 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
metrics::Reset();
VoiceEngine* voice_engine = VoiceEngine::Create();
VoEBase* voe_base = VoEBase::GetInterface(voice_engine);
- const std::string audio_filename =
- test::ResourcePath("voice_engine/audio_long16", "pcm");
- ASSERT_STRNE("", audio_filename.c_str());
- FakeAudioDevice fake_audio_device(Clock::GetRealTimeClock(), audio_filename,
- audio_rtp_speed);
+ FakeAudioDevice fake_audio_device(audio_rtp_speed, 48000, 256);
EXPECT_EQ(0, voe_base->Init(&fake_audio_device, nullptr, decoder_factory_));
VoEBase::ChannelConfig config;
config.enable_voice_pacing = true;
@@ -264,16 +260,15 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
Start();
- fake_audio_device.Start();
+ audio_send_stream->Start();
audio_receive_stream->Start();
EXPECT_EQ(0, voe_base->StartSend(send_channel_id));
the sun 2017/01/31 16:27:07 This line shouldn't be needed.
perkj_webrtc 2017/01/31 19:11:07 Done.
EXPECT_TRUE(observer.Wait())
<< "Timed out while waiting for audio and video to be synchronized.";
- EXPECT_EQ(0, voe_base->StopSend(send_channel_id));
- EXPECT_EQ(0, voe_base->StopPlayout(recv_channel_id));
- fake_audio_device.Stop();
+ audio_send_stream->Stop();
+ audio_receive_stream->Stop();
Stop();
video_send_transport.StopSending();
« no previous file with comments | « no previous file | webrtc/modules/audio_device/include/fake_audio_device.h » ('j') | webrtc/test/fake_audio_device.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698