NetEq: Create an audio interruption metric
This CL adds a new metric to NetEq, which logs whenever a loss
concealment event has lasted longer than 150 ms (an "interruption").
The number of such events, as well as the sum length of them, is kept
in a SampleCounter, which can be queried at any time.
Any initial PLC at the beginning of a call, before the first packet is
decoded, is ignored.
Unit tests and piping to neteq_rtpplay are included.
Bug: webrtc:10549
Change-Id: I8a224a34254c47c74317617f420f6de997232d88
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132796
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27781}
diff --git a/modules/audio_coding/neteq/include/neteq.h b/modules/audio_coding/neteq/include/neteq.h
index 8721663..c0c836f 100644
--- a/modules/audio_coding/neteq/include/neteq.h
+++ b/modules/audio_coding/neteq/include/neteq.h
@@ -87,6 +87,11 @@
// packet can be made dynamic.
uint64_t relative_packet_arrival_delay_ms = 0;
uint64_t jitter_buffer_packets_received = 0;
+ // An interruption is a loss-concealment event lasting at least 150 ms. The
+ // two stats below count the number os such events and the total duration of
+ // these events.
+ uint64_t interruption_count = 0;
+ uint64_t total_interruption_duration_ms = 0;
};
// Metrics that describe the operations performed in NetEq, and the internal