Add VoE interface to VieRTP test

BUG=

Review URL: https://webrtc-codereview.appspot.com/1097015

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3527 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mikhal@webrtc.org 2013-02-16 01:35:59 +00:00
parent e3d6ffede4
commit 3897255b63

View File

@ -686,6 +686,18 @@ void ViEAutoTest::ViERtpRtcpAPITest()
tbChannel.videoChannel, false));
// Buffering mode - sender side.
// Set VoE (required to set up stream-sync).
webrtc::VoiceEngine* voice_engine = webrtc::VoiceEngine::Create();
EXPECT_TRUE(NULL != voice_engine);
webrtc::VoEBase* voe_base = webrtc::VoEBase::GetInterface(voice_engine);
EXPECT_TRUE(NULL != voe_base);
EXPECT_EQ(0, voe_base->Init());
int audio_channel = voe_base->CreateChannel();
EXPECT_NE(-1, audio_channel);
EXPECT_EQ(0, ViE.base->SetVoiceEngine(voice_engine));
EXPECT_EQ(0, ViE.base->ConnectAudioChannel(tbChannel.videoChannel,
audio_channel));
EXPECT_EQ(-1, ViE.rtp_rtcp->SetSenderBufferingMode(
invalid_channel_id, 0));
int invalid_delay = -1;
@ -713,6 +725,12 @@ void ViEAutoTest::ViERtpRtcpAPITest()
EXPECT_EQ(0, ViE.rtp_rtcp->SetReceiverBufferingMode(
tbChannel.videoChannel, 0));
EXPECT_EQ(0, ViE.base->DisconnectAudioChannel(tbChannel.videoChannel));
EXPECT_EQ(0, ViE.base->SetVoiceEngine(NULL));
EXPECT_EQ(0, voe_base->DeleteChannel(audio_channel));
voe_base->Release();
EXPECT_TRUE(webrtc::VoiceEngine::Delete(voice_engine));
//***************************************************************
// Testing finished. Tear down Video Engine
//***************************************************************