Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Unified Diff: webrtc/modules/audio_processing/aec3/block_processor.cc

Issue 2722453002: Adding metrics to AEC3 (Closed)
Patch Set: Changed some of the names for the metrics Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/aec3/block_processor.cc
diff --git a/webrtc/modules/audio_processing/aec3/block_processor.cc b/webrtc/modules/audio_processing/aec3/block_processor.cc
index 223b69381365df3a2e44af78f26f1f34342d85cf..5055b3f77deedcb7805989cf3f381f8f1a552ec3 100644
--- a/webrtc/modules/audio_processing/aec3/block_processor.cc
+++ b/webrtc/modules/audio_processing/aec3/block_processor.cc
@@ -13,9 +13,9 @@
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/optional.h"
#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
+#include "webrtc/modules/audio_processing/aec3/block_processor_metrics.h"
#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/system_wrappers/include/logging.h"
namespace webrtc {
namespace {
@@ -44,6 +44,7 @@ class BlockProcessorImpl final : public BlockProcessor {
std::unique_ptr<RenderDelayBuffer> render_buffer_;
std::unique_ptr<RenderDelayController> delay_controller_;
std::unique_ptr<EchoRemover> echo_remover_;
+ BlockProcessorMetrics metrics_;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BlockProcessorImpl);
};
@@ -88,8 +89,9 @@ void BlockProcessorImpl::ProcessCapture(
delay_controller_->AlignmentHeadroomSamples(),
EchoPathVariability(echo_path_gain_change, render_delay_change),
capture_signal_saturation, render_block, capture_block);
+ metrics_.UpdateCapture(false);
} else {
- LOG(LS_INFO) << "AEC3 empty render buffer";
+ metrics_.UpdateCapture(true);
}
}
@@ -102,10 +104,10 @@ bool BlockProcessorImpl::BufferRender(std::vector<std::vector<float>>* block) {
!delay_controller_->AnalyzeRender((*block)[0]);
const bool render_buffer_overrun = !render_buffer_->Insert(block);
if (delay_controller_overrun || render_buffer_overrun) {
- LOG(LS_INFO) << "AEC3 buffer overrrun";
+ metrics_.UpdateRender(true);
return false;
}
-
+ metrics_.UpdateRender(false);
return true;
}
« no previous file with comments | « webrtc/modules/audio_processing/aec3/aec3_common.h ('k') | webrtc/modules/audio_processing/aec3/block_processor_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698