Add stats totalSamplesReceived and concealedSamples

Adds two new stats to RTCMediaStreamTrackStats:
* totalSamplesReceived is the total number of samples received on
      the audio channel and includes real and synthetic samples.
* concealedSamples is the total number of synthetic samples
      received on the audio channel used to conceal packet loss.

Bug: webrtc:8076
Change-Id: I36e9828525ec341490cf3310a972b56a8b443667
Reviewed-on: https://chromium-review.googlesource.com/615902
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19506}
This commit is contained in:
Steve Anton
2017-08-24 17:15:13 -07:00
committed by Commit Bot
parent d6a5cbdf4c
commit 2dbc69fa64
20 changed files with 121 additions and 9 deletions

View File

@ -525,6 +525,18 @@ class RTCStatsReportVerifier {
verifier.MarkMemberTested(
media_stream_track.echo_return_loss_enhancement, true);
}
// totalSamplesReceived and concealedSamples are only present on inbound
// audio tracks.
if (*media_stream_track.kind == RTCMediaStreamTrackKind::kAudio &&
*media_stream_track.remote_source) {
verifier.TestMemberIsNonNegative<uint64_t>(
media_stream_track.total_samples_received);
verifier.TestMemberIsNonNegative<uint64_t>(
media_stream_track.concealed_samples);
} else {
verifier.TestMemberIsUndefined(media_stream_track.total_samples_received);
verifier.TestMemberIsUndefined(media_stream_track.concealed_samples);
}
return verifier.ExpectAllMembersSuccessfullyTested();
}