Added test for NetEQ stereo with no input
This test verifies that NetEQ behaves as it should when using stereo and not inserting any data before calling recout. The main purpose of the test is to find memory issues. BUG=http://code.google.com/p/webrtc/issues/detail?id=270 TEST=trybots, neteq_unittests Review URL: https://webrtc-codereview.appspot.com/863010 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2875 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
b0a8a3bfdd
commit
3df18d72ba
@ -602,4 +602,32 @@ TEST_F(NetEqDecodingTest, LongCngWithClockDrift) {
|
|||||||
EXPECT_GE(delay_after, delay_before - 20 * 16);
|
EXPECT_GE(delay_after, delay_before - 20 * 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(NetEqDecodingTest, NoInputDataStereo) {
|
||||||
|
void *ms_info;
|
||||||
|
ms_info = malloc(WebRtcNetEQ_GetMasterSlaveInfoSize());
|
||||||
|
neteq_inst_->setMaster();
|
||||||
|
|
||||||
|
// Slave instance without decoders (because it is easier).
|
||||||
|
WebRtcNetEQDecoder usedCodec[kDecoderReservedEnd - 1];
|
||||||
|
usedCodec[0] = kDecoderPCMu;
|
||||||
|
NETEQTEST_NetEQClass* slave_inst =
|
||||||
|
new NETEQTEST_NetEQClass(usedCodec, 1, 8000, kTCPLargeJitter);
|
||||||
|
ASSERT_TRUE(slave_inst);
|
||||||
|
NETEQTEST_Decoder* dec = new decoder_PCMU(0);
|
||||||
|
ASSERT_TRUE(dec != NULL);
|
||||||
|
dec->loadToNetEQ(*slave_inst);
|
||||||
|
slave_inst->setSlave();
|
||||||
|
|
||||||
|
// Pull out data.
|
||||||
|
const int kNumFrames = 100;
|
||||||
|
for (int i = 0; i < kNumFrames; ++i) {
|
||||||
|
ASSERT_TRUE(kBlockSize8kHz == neteq_inst_->recOut(out_data_, ms_info));
|
||||||
|
ASSERT_TRUE(kBlockSize8kHz == slave_inst->recOut(out_data_, ms_info));
|
||||||
|
}
|
||||||
|
|
||||||
|
delete dec;
|
||||||
|
delete slave_inst;
|
||||||
|
free(ms_info);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
Loading…
Reference in New Issue
Block a user