Consolidate GetFrame and InsertPacket and move NACK list processing to after a packet has been successfully inserted.

TEST=trybots
BUG=1799
R=mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4080 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org
2013-05-21 15:25:53 +00:00
parent 956aa7e087
commit 3417eb49f6
9 changed files with 311 additions and 394 deletions

View File

@ -104,7 +104,7 @@ VCMFrameBuffer::InsertPacket(const VCMPacket& packet, int64_t timeInMs,
// Sanity to check if the frame has been freed. (Too old for example)
if (_state == kStateFree)
{
return kStateError;
return kGeneralError;
}
// is this packet part of this frame
@ -164,6 +164,11 @@ VCMFrameBuffer::InsertPacket(const VCMPacket& packet, int64_t timeInMs,
_sessionInfo.UpdateDataPointers(prevBuffer, _buffer);
}
if (packet.width > 0 && packet.height > 0) {
_encodedWidth = packet.width;
_encodedHeight = packet.height;
}
CopyCodecSpecific(&packet.codecSpecificHeader);
int retVal = _sessionInfo.InsertPacket(packet, _buffer,