Making dual decoder work again in VCM

Changing the assignment operator in VCMJitterBuffer to a named
function (CopyFrom) instead, since it is not a straight
assignment. Also fixing two bugs in the jitter copy function.

Bug fix in VCMEncodedFrame: The copy constructor did not
copy _length.

In VCM codec database, make sure that the callback object is
preserved when copying back from secondary to primary decoder.

In VP8 wrapper, adding code to copy the _decodedImage to the
Copy() method.

Bugfix in video_coding_test rtp_player:
The retransmissions where made in reverse order. Now new items are
appended to the end of the LostPackets list, which makes the order
correct when retransmitting.

Handling the case when cloning an unused decoder state:
When the decoder has not successfully decoded a frame yet,
it cannot be cloned. A NULL pointer will be returned all
the way out to VideoCodingModuleImpl::Decode(). When this
happens, the VCM will call Reset() for the dual receiver,
in order to reset the state to kPassive.

Review URL: http://webrtc-codereview.appspot.com/239010

git-svn-id: http://webrtc.googlecode.com/svn/trunk@873 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org
2011-11-02 18:58:39 +00:00
parent 4bb141078f
commit baf6db5ead
9 changed files with 48 additions and 12 deletions

View File

@@ -42,8 +42,8 @@ VCMReceiver::~VCMReceiver()
delete &_critSect;
}
WebRtc_Word32
VCMReceiver::Initialize()
void
VCMReceiver::Reset()
{
CriticalSectionScoped cs(_critSect);
if (!_jitterBuffer.Running())
@@ -62,6 +62,16 @@ VCMReceiver::Initialize()
else
{
_state = kPassive;
}
}
WebRtc_Word32
VCMReceiver::Initialize()
{
CriticalSectionScoped cs(_critSect);
Reset();
if (!_master)
{
SetNackMode(kNoNack);
}
return VCM_OK;
@@ -416,7 +426,7 @@ VCMReceiver::DualDecoderCaughtUp(VCMEncodedFrame* dualFrame, VCMReceiver& dualRe
void
VCMReceiver::CopyJitterBufferStateFromReceiver(const VCMReceiver& receiver)
{
_jitterBuffer = receiver._jitterBuffer;
_jitterBuffer.CopyFrom(receiver._jitterBuffer);
}
VCMReceiverState