Re: [webrtc-stats] jitterBufferDelay and concealed samples, DTX/CNG samples

Elaborating on my proposal above, I can come up with two different variants. One that deals with packets/frames as the base unit, and one that uses samples instead.

1. Packets as unit:
When a frame is taken out of the jitter buffer and given to the decoder, the time it sat waiting in the buffer is calculated and added to the jitterBuferDelay, and the framesDecoded is incremented. This is true for both speech frames and comfort noise frames. To calculate an average delay, normalize jitterBuferDelay with framesDecoded.

2. Samples as unit:
When a frame is taken out of the jitter buffer and given to the decoder, the time it sat waiting in the buffer is multiplied by the number of samples that frame produced, and the result is added to the jitterBuferDelay. samplesDecoded is incremented by the same number of samples. This is true and straightforward for speech frames. For comfort noise frames, which typically does not have a real length, the implementation can give them any length (also zero) and use that both as multiplier to the delay and to increment samplesDecoded. The tricky part here is that the relationship to totalSamplesReceived and concealedSamples may not be hard to define, and will probably be implementation specific. To calculate an average delay, normalize jitterBuferDelay with samplesDecoded.

Of the two above, I prefer number 1.


-- 
GitHub Notification of comment by hlundin
Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/246#issuecomment-337479719 using your GitHub account

Received on Wednesday, 18 October 2017 07:05:51 UTC