Added logic for kSelectiveErrors to VCMJitterBuffer and corresponding unit tests.

R=marpan@google.com, mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4503 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
agalusza@google.com
2013-08-08 01:12:33 +00:00
parent 676ff1ed89
commit d177c10e2d
8 changed files with 375 additions and 55 deletions

View File

@ -175,10 +175,11 @@ class VCMJitterBuffer {
// Returns a list of the sequence numbers currently missing.
uint16_t* GetNackList(uint16_t* nack_list_size, bool* request_key_frame);
// Enable/disable decoding with errors.
// TODO(agalusza): Add logic for handling kSelectiveErrors.
void DecodeErrorMode(VCMDecodeErrorMode error_mode)
{decode_error_mode_ = error_mode;}
// Set decode error mode. Setting kNoErrors will have immediate effect.
// Setting kWithErrors and kSelectiveErrors will take full effect once the
// existing incomplete frames leave the JB or have a packet added (as that
// would cause their state to be reevlauated).
void DecodeErrorMode(VCMDecodeErrorMode error_mode);
int64_t LastDecodedTimestamp() const;
VCMDecodeErrorMode decode_error_mode() const {return decode_error_mode_;}
@ -245,6 +246,8 @@ class VCMJitterBuffer {
bool RecycleFramesUntilKeyFrame();
// Updates the frame statistics.
// Counts only complete frames, so decodable incomplete frames will not be
// counted.
void CountFrame(const VCMFrameBuffer& frame);
// Update rolling average of packets per frame.