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

Unified Diff: webrtc/modules/audio_processing/test/unpack.cc

Issue 1348903004: Adding APM configuration in AEC dump. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: renaming two fields Created 5 years, 2 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/test/unpack.cc
diff --git a/webrtc/modules/audio_processing/test/unpack.cc b/webrtc/modules/audio_processing/test/unpack.cc
index 2484828bd18662ea1bb5ae15306dd0adcd28719f..3d5a24c42be867604a168245ed0f1ec511d0fc77 100644
--- a/webrtc/modules/audio_processing/test/unpack.cc
+++ b/webrtc/modules/audio_processing/test/unpack.cc
@@ -40,6 +40,11 @@ DEFINE_bool(text,
false,
"Write non-audio files as text files instead of binary files.");
+#define PRINT_CONFIG(field_name) \
+ if (msg.has_##field_name()) { \
+ fprintf(settings_file, " " #field_name ": %d\n", msg.field_name()); \
+ }
+
namespace webrtc {
using audioproc::Event;
@@ -83,6 +88,9 @@ int do_main(int argc, char* argv[]) {
rtc::scoped_ptr<RawFile> reverse_raw_file;
rtc::scoped_ptr<RawFile> input_raw_file;
rtc::scoped_ptr<RawFile> output_raw_file;
+
+ FILE* settings_file = OpenFile(FLAGS_settings_file, "wb");
+
while (ReadMessageFromFile(debug_file, &event_msg)) {
if (event_msg.type() == Event::REVERSE_STREAM) {
if (!event_msg.has_reverse_stream()) {
@@ -217,13 +225,42 @@ int do_main(int argc, char* argv[]) {
}
}
}
+ } else if (event_msg.type() == Event::CONFIG) {
+ if (!event_msg.has_config()) {
+ printf("Corrupt input file: Config missing.\n");
+ return 1;
+ }
+ const audioproc::Config msg = event_msg.config();
+
+ fprintf(settings_file, "APM re-config at frame: %d\n", frame_count);
+ // AEC.
Andrew MacDonald 2015/10/02 21:46:04 Same here, these comments are unnecessary. Use lin
minyue-webrtc 2015/10/02 21:57:34 Done.
+ PRINT_CONFIG(aec_enabled);
+ PRINT_CONFIG(aec_delay_agnostic_enabled);
+ PRINT_CONFIG(aec_drift_compensation_enabled);
+ PRINT_CONFIG(aec_extended_filter_enabled);
+ PRINT_CONFIG(aec_suppression_level);
+ // AECM.
+ PRINT_CONFIG(aecm_enabled);
+ PRINT_CONFIG(aecm_comfort_noise_enabled);
+ PRINT_CONFIG(aecm_routing_mode);
+ // AGC.
+ PRINT_CONFIG(agc_enabled);
+ PRINT_CONFIG(agc_noise_robust_enabled);
+ PRINT_CONFIG(agc_mode);
+ PRINT_CONFIG(agc_limiter_enabled);
+ // HPF.
+ PRINT_CONFIG(hpf_enabled);
+ // NS.
+ PRINT_CONFIG(ns_enabled);
+ PRINT_CONFIG(ns_level);
+ // Transient suppression.
+ PRINT_CONFIG(transient_suppression_enabled);
} else if (event_msg.type() == Event::INIT) {
if (!event_msg.has_init()) {
printf("Corrupt input file: Init missing.\n");
return 1;
}
- static FILE* settings_file = OpenFile(FLAGS_settings_file, "wb");
const Init msg = event_msg.init();
// These should print out zeros if they're missing.
fprintf(settings_file, "Init at frame: %d\n", frame_count);

Powered by Google App Engine
This is Rietveld 408576698