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}
diff --git a/webrtc/stats/rtcstats_objects.cc b/webrtc/stats/rtcstats_objects.cc
index 19e94b3..284dfe0 100644
--- a/webrtc/stats/rtcstats_objects.cc
+++ b/webrtc/stats/rtcstats_objects.cc
@@ -379,9 +379,11 @@
&full_frames_lost,
&audio_level,
&total_audio_energy,
- &total_samples_duration,
&echo_return_loss,
- &echo_return_loss_enhancement);
+ &echo_return_loss_enhancement,
+ &total_samples_received,
+ &total_samples_duration,
+ &concealed_samples);
// clang-format on
RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
@@ -410,9 +412,11 @@
full_frames_lost("fullFramesLost"),
audio_level("audioLevel"),
total_audio_energy("totalAudioEnergy"),
- total_samples_duration("totalSamplesDuration"),
echo_return_loss("echoReturnLoss"),
- echo_return_loss_enhancement("echoReturnLossEnhancement") {
+ echo_return_loss_enhancement("echoReturnLossEnhancement"),
+ total_samples_received("totalSamplesReceived"),
+ total_samples_duration("totalSamplesDuration"),
+ concealed_samples("concealedSamples") {
RTC_DCHECK(kind == RTCMediaStreamTrackKind::kAudio ||
kind == RTCMediaStreamTrackKind::kVideo);
}
@@ -437,9 +441,11 @@
full_frames_lost(other.full_frames_lost),
audio_level(other.audio_level),
total_audio_energy(other.total_audio_energy),
- total_samples_duration(other.total_samples_duration),
echo_return_loss(other.echo_return_loss),
- echo_return_loss_enhancement(other.echo_return_loss_enhancement) {}
+ echo_return_loss_enhancement(other.echo_return_loss_enhancement),
+ total_samples_received(other.total_samples_received),
+ total_samples_duration(other.total_samples_duration),
+ concealed_samples(other.concealed_samples) {}
RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() {
}