Adding two new network metrics to NetEQ

Clock-drift (in parts-per-million) and peaky-jitter mode status.
Both metrics are propagated to the VoE API. Tests are added
in the NetEQ unittests, and to some extent in ACM unittests
and VoE tests.

Introducing a proper translation between structs NetworkStatistics
and ACMNetworkStatistics.

Note: The file neteq_network_stats.dat in resources must be updated
for the unittests to pass.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1328 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org
2012-01-04 13:09:55 +00:00
parent 80d28b22b9
commit d439870473
12 changed files with 175 additions and 14 deletions

View File

@@ -1241,6 +1241,13 @@ int WebRtcNetEQ_GetNetworkStatistics(void *inst, WebRtcNetEQ_NetworkStatistics *
stats->preferredBufferSize = 0;
}
/***********************************/
/* Check if jitter peaks are found */
/***********************************/
stats->jitterPeaksFound =
NetEqMainInst->MCUinst.BufferStat_inst.Automode_inst.peakFound;
/***********************/
/* Calculate loss rate */
/***********************/
@@ -1525,6 +1532,9 @@ int WebRtcNetEQ_GetNetworkStatistics(void *inst, WebRtcNetEQ_NetworkStatistics *
stats->currentPreemptiveRate = 1 << 14; /* 1 in Q14 */
}
stats->clockDriftPPM = WebRtcNetEQ_AverageIAT(
&NetEqMainInst->MCUinst.BufferStat_inst.Automode_inst);
/* reset counters */
WebRtcNetEQ_ResetMcuInCallStats(&(NetEqMainInst->MCUinst));
WebRtcNetEQ_ClearInCallStats(&(NetEqMainInst->DSPinst));