Split of stereo packets moved

In this CL I have rewritten the way we handle stereo packets in VoE.
Before this change we split the packets in the RTP module and added two packets to ACM, one for the left channel and one for the right. This lead to timing problems caused when a different thread called RecOut in between the two calls to add stereo packet to ACM. (RecOut is called to pull audio data, decode packets, on the receiving side).

While doing the change I also took the opportunity to changed some functions so that the data stream is uint8 everywhere.

The list of files in this CL is long, but should be fairly easy to review. It is difficult to see what has been changed  in some of the tests, but I can explain offline.

Reviewers:
Björn - /src/modules/audio_coding
Patrik - /src/modules/rtp_rtcp
Patrik -/src/modules/utility
Henrik A - /src/voice_engine

BUG=410
TEST=voe_cmd_test

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2012 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
tina.legrand@webrtc.org
2012-04-12 11:02:38 +00:00
parent ce33035dee
commit 16b6b90a82
35 changed files with 406 additions and 442 deletions

View File

@@ -598,6 +598,12 @@ int NETEQTEST_RTPpacket::splitStereo(NETEQTEST_RTPpacket* slaveRtp,
splitStereoFrame(slaveRtp);
break;
}
case stereoModeDuplicate:
{
// frame based codec, send the whole packet to both master and slave
splitStereoDouble(slaveRtp);
break;
}
case stereoModeMono:
{
assert(false);
@@ -780,6 +786,17 @@ void NETEQTEST_RTPpacket::splitStereoFrame(NETEQTEST_RTPpacket* slaveRtp)
_payloadLen /= 2;
slaveRtp->_payloadLen = _payloadLen;
}
void NETEQTEST_RTPpacket::splitStereoDouble(NETEQTEST_RTPpacket* slaveRtp)
{
if(!_payloadPtr || !slaveRtp || !slaveRtp->_payloadPtr
|| _payloadLen <= 0 || slaveRtp->_memSize < _memSize)
{
return;
}
memcpy(slaveRtp->_payloadPtr, _payloadPtr, _payloadLen);
slaveRtp->_payloadLen = _payloadLen;
}
// Get the RTP header for the RED payload indicated by argument index.
// The first RED payload is index = 0.