Removing statistics API from NetEQ

Removing WebRtcNetEQ_GetJitterStatistics(),
WebRtcNetEQ_ResetJitterStatistics(), and the associated
struct WebRtcNetEQ_JitterStatistics. The change ripples
through all the way to the VoiceEngine API.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@998 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org
2011-11-23 09:36:23 +00:00
parent 7d3e9498bc
commit df10de4b27
17 changed files with 1 additions and 531 deletions

View File

@@ -1593,79 +1593,6 @@ int WebRtcNetEQ_GetCurrentDelay(const void *inst, WebRtc_UWord16 *currentDelayMs
return 0;
}
/* Get the "post-call" jitter statistics from NetEQ.
* The statistics are not reset by the query. Use the function WebRtcNetEQ_ResetJitterStatistics
* to reset the statistics. */
int WebRtcNetEQ_GetJitterStatistics(void *inst, WebRtcNetEQ_JitterStatistics *jitterStats)
{
MainInst_t *NetEqMainInst = (MainInst_t*) inst;
/* collect statistics not yet transfered to post-call statistics */
NetEqMainInst->MCUinst.statInst.accelerateMs
+= WebRtcSpl_DivU32U16(
WEBRTC_SPL_UMUL_32_16( NetEqMainInst->DSPinst.statInst.accelerateLength, (WebRtc_UWord16) 1000),
NetEqMainInst->MCUinst.fs);
jitterStats->jbMinSize = NetEqMainInst->MCUinst.statInst.jbMinSize; /* smallest Jitter Buffer size during call - mSec */
jitterStats->jbMaxSize = NetEqMainInst->MCUinst.statInst.jbMaxSize; /* largest Jitter Buffer size during call - mSec */
jitterStats->jbAvgSize = NetEqMainInst->MCUinst.statInst.jbAvgSizeQ16 >> 16; /* the average JB size, measured over time - mSec */
jitterStats->jbChangeCount = NetEqMainInst->MCUinst.statInst.jbChangeCount; /* number of times the Jitter Buffer changed */
jitterStats->lateLossMs = (NetEqMainInst->MCUinst.PacketBuffer_inst.totalDiscardedPackets
* NetEqMainInst->MCUinst.PacketBuffer_inst.packSizeSamples * 1000)
/ NetEqMainInst->MCUinst.fs; /* number of frames received late */
jitterStats->accelerateMs = NetEqMainInst->MCUinst.statInst.accelerateMs; /* milliseconds removed to reduce jitter buffer size */
jitterStats->flushedMs = (NetEqMainInst->MCUinst.PacketBuffer_inst.totalFlushedPackets
* NetEqMainInst->MCUinst.PacketBuffer_inst.packSizeSamples * 1000)
/ NetEqMainInst->MCUinst.fs;
jitterStats->generatedSilentMs = NetEqMainInst->MCUinst.statInst.generatedSilentMs; /* number of generated silence frames */
jitterStats->countExpandMoreThan120ms
= NetEqMainInst->MCUinst.statInst.countExpandMoreThan120ms; /* count of tiny BFI events output audio */
jitterStats->countExpandMoreThan250ms
= NetEqMainInst->MCUinst.statInst.countExpandMoreThan250ms; /* count of small BFI events output audio */
jitterStats->countExpandMoreThan500ms
= NetEqMainInst->MCUinst.statInst.countExpandMoreThan500ms; /* count of medium BFI events output audio */
jitterStats->countExpandMoreThan2000ms
= NetEqMainInst->MCUinst.statInst.countExpandMoreThan2000ms; /* count of large BFI events output audio */
jitterStats->longestExpandDurationMs
= NetEqMainInst->MCUinst.statInst.longestExpandDurationMs; /* mSec duration of longest audio drop-out */
jitterStats->countIAT500ms
= NetEqMainInst->MCUinst.BufferStat_inst.Automode_inst.countIAT500ms; /* count of times we got small network outage */
jitterStats->countIAT1000ms
= NetEqMainInst->MCUinst.BufferStat_inst.Automode_inst.countIAT1000ms; /* count of times we got medium network outage */
jitterStats->countIAT2000ms
= NetEqMainInst->MCUinst.BufferStat_inst.Automode_inst.countIAT2000ms; /* count of times we got large network outage */
jitterStats->longestIATms
= NetEqMainInst->MCUinst.BufferStat_inst.Automode_inst.longestIATms; /* mSec duration of longest network outage */
jitterStats->minPacketDelayMs = NetEqMainInst->MCUinst.statInst.minPacketDelayMs; /* min time incoming frame "waited" to be played */
jitterStats->maxPacketDelayMs = NetEqMainInst->MCUinst.statInst.maxPacketDelayMs; /* max time incoming frame "waited" to be played */
jitterStats->avgPacketDelayMs = NetEqMainInst->MCUinst.statInst.avgPacketDelayMs; /* avg time incoming frame "waited" to be played */
jitterStats->interpolatedVoiceMs
= WebRtcSpl_DivU32U16(
WEBRTC_SPL_UMUL_32_16( NetEqMainInst->DSPinst.statInst.expandedVoiceSamples, (WebRtc_UWord16) 1000),
NetEqMainInst->MCUinst.fs); /* interpolated voice in ms */
jitterStats->interpolatedSilentMs
= WebRtcSpl_DivU32U16(
WEBRTC_SPL_UMUL_32_16( NetEqMainInst->DSPinst.statInst.expandedNoiseSamples, (WebRtc_UWord16) 1000),
NetEqMainInst->MCUinst.fs); /* interpolated silence in ms */
return (0);
}
/* Reset "post-call" jitter statistics. */
int WebRtcNetEQ_ResetJitterStatistics(void *inst)
{
MainInst_t *NetEqMainInst = (MainInst_t*) inst;
WebRtcNetEQ_ResetMcuJitterStat(&(NetEqMainInst->MCUinst));
WebRtcNetEQ_ClearPostCallStats(&(NetEqMainInst->DSPinst));
return (0);
}
/****************************************************************************
* WebRtcNetEQ_SetVADInstance(...)
*