Add output directory option for audioproc_f data dump files.
Bug: webrtc:10000 Change-Id: Iac21f826e78d6cb339c68fdeeedf9fe39920ac31 Reviewed-on: https://webrtc-review.googlesource.com/c/110904 Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Reviewed-by: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25713}
This commit is contained in:
committed by
Commit Bot
parent
388e4e9d96
commit
4bc60452f7
@ -128,6 +128,10 @@ AudioProcessingSimulator::AudioProcessingSimulator(
|
||||
worker_queue_("file_writer_task_queue") {
|
||||
RTC_CHECK(!settings_.dump_internal_data || WEBRTC_APM_DEBUG_DUMP == 1);
|
||||
ApmDataDumper::SetActivated(settings_.dump_internal_data);
|
||||
if (settings_.dump_internal_data_output_dir.has_value()) {
|
||||
ApmDataDumper::SetOutputDirectory(
|
||||
settings_.dump_internal_data_output_dir.value());
|
||||
}
|
||||
|
||||
if (settings_.ed_graph_output_filename &&
|
||||
!settings_.ed_graph_output_filename->empty()) {
|
||||
|
||||
@ -95,6 +95,7 @@ struct SimulationSettings {
|
||||
bool store_intermediate_output = false;
|
||||
bool print_aec3_parameter_values = false;
|
||||
bool dump_internal_data = false;
|
||||
absl::optional<std::string> dump_internal_data_output_dir;
|
||||
absl::optional<std::string> custom_call_order_filename;
|
||||
absl::optional<std::string> aec3_settings_filename;
|
||||
};
|
||||
|
||||
@ -216,6 +216,9 @@ WEBRTC_DEFINE_string(aec3_settings,
|
||||
WEBRTC_DEFINE_bool(dump_data,
|
||||
false,
|
||||
"Dump internal data during the call (requires build flag)");
|
||||
WEBRTC_DEFINE_string(dump_data_output_dir,
|
||||
"",
|
||||
"Internal data dump output directory");
|
||||
WEBRTC_DEFINE_bool(help, false, "Print this message");
|
||||
|
||||
void SetSettingIfSpecified(const std::string& value,
|
||||
@ -351,6 +354,8 @@ SimulationSettings CreateSettings() {
|
||||
settings.store_intermediate_output = FLAG_store_intermediate_output;
|
||||
settings.print_aec3_parameter_values = FLAG_print_aec3_parameter_values;
|
||||
settings.dump_internal_data = FLAG_dump_data;
|
||||
SetSettingIfSpecified(FLAG_dump_data_output_dir,
|
||||
&settings.dump_internal_data_output_dir);
|
||||
|
||||
return settings;
|
||||
}
|
||||
@ -505,6 +510,11 @@ void PerformBasicParameterSanityChecks(const SimulationSettings& settings) {
|
||||
ReportConditionalErrorAndExit(
|
||||
WEBRTC_APM_DEBUG_DUMP == 0 && settings.dump_internal_data,
|
||||
"Error: --dump_data cannot be set without proper build support.\n");
|
||||
|
||||
ReportConditionalErrorAndExit(
|
||||
!settings.dump_internal_data &&
|
||||
settings.dump_internal_data_output_dir.has_value(),
|
||||
"Error: --dump_data_output_dir cannot be set without --dump_data.\n");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user