Packet waiting-time statistics

Adding new statistics API to NetEQ, reporting the waiting time
for each frame. The output is raw waiting time for the frames
that have been decoded since the last statistics report (or
maximum 100 frames). The statistics are reset on each query.

Implemented functionality in ACM to query NetEQ for the raw
waiting times, and process it to produce max, average and
median.

Updating common_types.h and VoiceEngine tests to include the
new metrics.

Unit tests are also added for NetEQ and AcmNetEq.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1251 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org
2011-12-20 15:45:05 +00:00
parent 219acc6cec
commit dbba1f969f
14 changed files with 385 additions and 10 deletions

View File

@@ -38,6 +38,8 @@ enum TsScaling
kTSscalingFourThirds
};
enum { kLenWaitingTimes = 100 };
typedef struct
{
@@ -77,6 +79,10 @@ typedef struct
WebRtc_UWord32 lostTS; /* Number of timestamps lost */
WebRtc_UWord32 lastReportTS; /* Timestamp elapsed since last report was given */
int waiting_times[kLenWaitingTimes]; /* Waiting time statistics storage. */
int len_waiting_times;
int next_waiting_time_index;
WebRtc_UWord32 externalTS;
WebRtc_UWord32 internalTS;
WebRtc_Word16 TSscalingInitialized;
@@ -114,6 +120,31 @@ int WebRtcNetEQ_McuReset(MCUInst_t *inst);
*/
int WebRtcNetEQ_ResetMcuInCallStats(MCUInst_t *inst);
/****************************************************************************
* WebRtcNetEQ_ResetWaitingTimeStats(...)
*
* Reset waiting-time statistics.
*
* Input:
* - inst : MCU instance.
*
* Return value : n/a
*/
void WebRtcNetEQ_ResetWaitingTimeStats(MCUInst_t *inst);
/****************************************************************************
* WebRtcNetEQ_LogWaitingTime(...)
*
* Log waiting-time to the statistics.
*
* Input:
* - inst : MCU instance.
* - waiting_time : Waiting time in "RecOut calls" (i.e., 1 call = 10 ms).
*
* Return value : n/a
*/
void WebRtcNetEQ_StoreWaitingTime(MCUInst_t *inst, int waiting_time);
/****************************************************************************
* WebRtcNetEQ_ResetMcuJitterStat(...)
*