Expose new audio stats on the API
Several new audio stats were recently standardized and implemented in
WebRTC in https://webrtc-review.googlesource.com/c/src/+/133887. This CL
adds these to the GetStats API.
Bug: webrtc:10442, webrtc:10443, webrtc:10444
Change-Id: I0e898ac14777e82b1a9099b5e0a5584eb9cb5934
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134213
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27839}
diff --git a/modules/audio_coding/acm2/acm_receiver.cc b/modules/audio_coding/acm2/acm_receiver.cc
index c10a71c..3bce0c4 100644
--- a/modules/audio_coding/acm2/acm_receiver.cc
+++ b/modules/audio_coding/acm2/acm_receiver.cc
@@ -251,6 +251,8 @@
NetEqLifetimeStatistics neteq_lifetime_stat = neteq_->GetLifetimeStatistics();
acm_stat->totalSamplesReceived = neteq_lifetime_stat.total_samples_received;
acm_stat->concealedSamples = neteq_lifetime_stat.concealed_samples;
+ acm_stat->silentConcealedSamples =
+ neteq_lifetime_stat.silent_concealed_samples;
acm_stat->concealmentEvents = neteq_lifetime_stat.concealment_events;
acm_stat->jitterBufferDelayMs = neteq_lifetime_stat.jitter_buffer_delay_ms;
acm_stat->jitterBufferEmittedCount =
@@ -262,6 +264,12 @@
acm_stat->interruptionCount = neteq_lifetime_stat.interruption_count;
acm_stat->totalInterruptionDurationMs =
neteq_lifetime_stat.total_interruption_duration_ms;
+ acm_stat->insertedSamplesForDeceleration =
+ neteq_lifetime_stat.inserted_samples_for_deceleration;
+ acm_stat->removedSamplesForAcceleration =
+ neteq_lifetime_stat.removed_samples_for_acceleration;
+ acm_stat->fecPacketsReceived = neteq_lifetime_stat.fec_packets_received;
+ acm_stat->fecPacketsDiscarded = neteq_lifetime_stat.fec_packets_discarded;
NetEqOperationsAndState neteq_operations_and_state =
neteq_->GetOperationsAndState();