Reland "Piping audio interruption metrics to API layer"

The metrics are now added as RTCNonStandardStatsMember objects in
RTCMediaStreamTrackStats. Unit tests are updated.

This is a reland of https://webrtc-review.googlesource.com/c/src/+/134303,
with fixes.

TBR=kwiberg@webrtc.org

Bug: webrtc:10549
Change-Id: I29dcc6fbfc69156715664e71acfa054c1b2d9038
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134500
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27806}
This commit is contained in:
Henrik Lundin
2019-04-29 17:00:46 +02:00
committed by Commit Bot
parent 7cca042dd4
commit 44125faba5
15 changed files with 59 additions and 15 deletions

View File

@ -79,9 +79,8 @@ void NetEqStatsPlotter::SimulationEnded(int64_t simulation_time_ms) {
const auto lifetime_stats_vector = stats_getter_->lifetime_stats();
if (!lifetime_stats_vector->empty()) {
auto lifetime_stats = lifetime_stats_vector->back().second;
printf(" num_interruptions: %" PRId64 "\n",
lifetime_stats.interruption_count);
printf(" sum_interruption_length_ms: %" PRId64 " ms\n",
printf(" num_interruptions: %d\n", lifetime_stats.interruption_count);
printf(" sum_interruption_length_ms: %d ms\n",
lifetime_stats.total_interruption_duration_ms);
printf(" interruption ratio: %f%%\n",
100.0 * lifetime_stats.total_interruption_duration_ms /