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

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: last commit was hasty, having an error 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
« no previous file with comments | « webrtc/modules/audio_processing/noise_suppression_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..24578e240c60404ac0e7df76917dc83b53952aac 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,37 @@ 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);
+
+ 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);
+ PRINT_CONFIG(aecm_enabled);
+ PRINT_CONFIG(aecm_comfort_noise_enabled);
+ PRINT_CONFIG(aecm_routing_mode);
+ PRINT_CONFIG(agc_enabled);
+ PRINT_CONFIG(agc_mode);
+ PRINT_CONFIG(agc_limiter_enabled);
+ PRINT_CONFIG(noise_robust_agc_enabled);
+ PRINT_CONFIG(hpf_enabled);
+ PRINT_CONFIG(ns_enabled);
+ PRINT_CONFIG(ns_level);
+ 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);
« no previous file with comments | « webrtc/modules/audio_processing/noise_suppression_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698