Removed lines preventing simultaneous kHardNack and decoding with errors. Also made changes recommended by gcl lint (with the exception of changing non-const references to pointers).

Propagated orthogonal API for decoding with errors from VideoCodingModule to VCMJitterBuffer.
Modified VCMJitterBuffer to allow three error modes: kNoErrors, kSelectiveErrors, kWithErrors.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4463 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
agalusza@google.com
2013-08-01 03:15:08 +00:00
parent d64719d895
commit a7e360e89b
15 changed files with 484 additions and 467 deletions

View File

@ -17,6 +17,7 @@
#include <vector>
#include "webrtc/modules/interface/module_common_types.h"
#include "webrtc/modules/video_coding/main/interface/video_coding.h"
#include "webrtc/modules/video_coding/main/interface/video_coding_defines.h"
#include "webrtc/modules/video_coding/main/source/decoding_state.h"
#include "webrtc/modules/video_coding/main/source/inter_frame_delay.h"
@ -175,9 +176,11 @@ class VCMJitterBuffer {
uint16_t* GetNackList(uint16_t* nack_list_size, bool* request_key_frame);
// Enable/disable decoding with errors.
void DecodeWithErrors(bool enable) {decode_with_errors_ = enable;}
// TODO(agalusza): Add logic for handling kSelectiveErrors.
void DecodeErrorMode(VCMDecodeErrorMode error_mode)
{decode_error_mode_ = error_mode;}
int64_t LastDecodedTimestamp() const;
bool decode_with_errors() const {return decode_with_errors_;}
VCMDecodeErrorMode decode_error_mode() const {return decode_error_mode_;}
// Used to compute time of complete continuous frames. Returns the timestamps
// corresponding to the start and end of the continuous complete buffer.
@ -330,7 +333,7 @@ class VCMJitterBuffer {
int max_packet_age_to_nack_; // Measured in sequence numbers.
int max_incomplete_time_ms_;
bool decode_with_errors_;
VCMDecodeErrorMode decode_error_mode_;
// Estimated rolling average of packets per frame
float average_packets_per_frame_;
// average_packets_per_frame converges fast if we have fewer than this many