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}
This commit is contained in:
@ -251,6 +251,8 @@ void AcmReceiver::GetNetworkStatistics(NetworkStatistics* acm_stat) {
|
||||
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 @@ void AcmReceiver::GetNetworkStatistics(NetworkStatistics* acm_stat) {
|
||||
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();
|
||||
|
||||
@ -84,9 +84,14 @@ struct NetworkStatistics {
|
||||
// https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats
|
||||
uint64_t totalSamplesReceived;
|
||||
uint64_t concealedSamples;
|
||||
uint64_t silentConcealedSamples;
|
||||
uint64_t concealmentEvents;
|
||||
uint64_t jitterBufferDelayMs;
|
||||
uint64_t jitterBufferEmittedCount;
|
||||
uint64_t insertedSamplesForDeceleration;
|
||||
uint64_t removedSamplesForAcceleration;
|
||||
uint64_t fecPacketsReceived;
|
||||
uint64_t fecPacketsDiscarded;
|
||||
// Stats below DO NOT correspond directly to anything in the WebRTC stats
|
||||
// Loss rate (network + late); fraction between 0 and 1, scaled to Q14.
|
||||
uint16_t currentPacketLossRate;
|
||||
|
||||
Reference in New Issue
Block a user