Sets up framework for decoding with errors: collects frame sizes (in number of packets) in JB and passes this information to VCMSessionInfo with rtt_ms as FrameData.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4424 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
agalusza@google.com
2013-07-29 21:48:11 +00:00
parent a0b2f1794b
commit d818dcb939
10 changed files with 309 additions and 233 deletions

View File

@ -58,8 +58,8 @@ class TimestampLessThan {
}
};
class FrameList :
public std::map<uint32_t, VCMFrameBuffer*, TimestampLessThan> {
class FrameList
: public std::map<uint32_t, VCMFrameBuffer*, TimestampLessThan> {
public:
void InsertFrame(VCMFrameBuffer* frame);
VCMFrameBuffer* FindFrame(uint32_t timestamp) const;
@ -244,6 +244,9 @@ class VCMJitterBuffer {
// Updates the frame statistics.
void CountFrame(const VCMFrameBuffer& frame);
// Update rolling average of packets per frame.
void UpdateAveragePacketsPerFrame(int current_number_packets_);
// Cleans the frame list in the JB from old/empty frames.
// Should only be called prior to actual use.
void CleanUpOldOrEmptyFrames();
@ -328,6 +331,11 @@ class VCMJitterBuffer {
int max_incomplete_time_ms_;
bool decode_with_errors_;
// 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
// frames.
int frame_counter_;
DISALLOW_COPY_AND_ASSIGN(VCMJitterBuffer);
};
} // namespace webrtc