Implement audio_interruption metric for kCodecPlc

Audio interruption metric is not implemented for codecs doing their own PLC.

R=ivoc@webrtc.org, jakobi@webrtc.org

Bug: b/177523033 webrtc:12456
Change-Id: I0aca6fa5c0ff617e76ee1e4ed8d95703c7097223
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206561
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Pablo Barrera González <barrerap@google.com>
Cr-Commit-Position: refs/heads/master@{#33229}
This commit is contained in:
Pablo Barrera González
2021-02-10 10:38:50 +01:00
committed by Commit Bot
parent 983627c88d
commit ff0e01f689
6 changed files with 146 additions and 36 deletions

View File

@ -1214,6 +1214,11 @@ int NetEqImpl::GetDecision(Operation* operation,
}
controller_->ExpandDecision(*operation);
if ((last_mode_ == Mode::kCodecPlc) && (*operation != Operation::kExpand)) {
// Getting out of the PLC expand mode, reporting interruptions.
// NetEq PLC reports this metrics in expand.cc
stats_->EndExpandEvent(fs_hz_);
}
// Check conditions for reset.
if (new_codec_ || *operation == Operation::kUndefined) {
@ -2159,7 +2164,7 @@ void NetEqImpl::SetSampleRateAndChannels(int fs_hz, size_t channels) {
expand_->overlap_length());
normal_.reset(new Normal(fs_hz, decoder_database_.get(), *background_noise_,
expand_.get()));
expand_.get(), stats_.get()));
accelerate_.reset(
accelerate_factory_->Create(fs_hz, channels, *background_noise_));
preemptive_expand_.reset(preemptive_expand_factory_->Create(