Reland "Prefix flag macros with WEBRTC_."

This is a reland of 5ccdc1331fcc3cd78eaa14408fe0c38d37a5a51d

Original change's description:
> Prefix flag macros with WEBRTC_.
>
> Macros defined in rtc_base/flags.h are intended to be used to define
> flags in WebRTC's binaries (e.g. tests).
>
> They are currently not prefixed and this could cause problems with
> downstream clients since these names are quite common.
>
> This CL adds the 'WEBRTC_' prefix to them.
>
> Generated with:
>
> for x in DECLARE DEFINE; do
>   for y in bool int float string FLAG; do
>     git grep -l "\b$x\_$y\b" | \
>     xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
>   done
> done
> git cl format
>
> Bug: webrtc:9884
> Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
> Reviewed-on: https://webrtc-review.googlesource.com/c/106682
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25270}

TBR=kwiberg@webrtc.org

Bug: webrtc:9884
Change-Id: I5ba5368a231a334d135ed5e6fd7a279629ced8a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/107161
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25277}
This commit is contained in:
Mirko Bonadei
2018-10-18 11:35:32 +02:00
committed by Commit Bot
parent c538fc77b0
commit 2dfa998be2
44 changed files with 1098 additions and 937 deletions

View File

@ -37,155 +37,170 @@ const char kUsageDescription[] =
"processing module, either based on wav files or "
"protobuf debug dump recordings.\n";
DEFINE_string(dump_input, "", "Aec dump input filename");
DEFINE_string(dump_output, "", "Aec dump output filename");
DEFINE_string(i, "", "Forward stream input wav filename");
DEFINE_string(o, "", "Forward stream output wav filename");
DEFINE_string(ri, "", "Reverse stream input wav filename");
DEFINE_string(ro, "", "Reverse stream output wav filename");
DEFINE_string(artificial_nearend, "", "Artificial nearend wav filename");
DEFINE_int(output_num_channels,
kParameterNotSpecifiedValue,
"Number of forward stream output channels");
DEFINE_int(reverse_output_num_channels,
kParameterNotSpecifiedValue,
"Number of Reverse stream output channels");
DEFINE_int(output_sample_rate_hz,
kParameterNotSpecifiedValue,
"Forward stream output sample rate in Hz");
DEFINE_int(reverse_output_sample_rate_hz,
kParameterNotSpecifiedValue,
"Reverse stream output sample rate in Hz");
DEFINE_bool(fixed_interface,
false,
"Use the fixed interface when operating on wav files");
DEFINE_int(aec,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the echo canceller");
DEFINE_int(aecm,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the mobile echo controller");
DEFINE_int(ed,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate (0) the residual echo detector");
DEFINE_string(ed_graph, "", "Output filename for graph of echo likelihood");
DEFINE_int(agc,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the AGC");
DEFINE_int(agc2,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the AGC2");
DEFINE_int(pre_amplifier,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the pre amplifier");
DEFINE_int(hpf,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the high-pass filter");
DEFINE_int(ns,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the noise suppressor");
DEFINE_int(ts,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the transient suppressor");
DEFINE_int(vad,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the voice activity detector");
DEFINE_int(le,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the level estimator");
DEFINE_bool(all_default,
false,
"Activate all of the default components (will be overridden by any "
"other settings)");
DEFINE_int(aec_suppression_level,
kParameterNotSpecifiedValue,
"Set the aec suppression level (0-2)");
DEFINE_int(delay_agnostic,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the AEC delay agnostic mode");
DEFINE_int(extended_filter,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the AEC extended filter mode");
DEFINE_int(aec3,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the experimental AEC mode AEC3");
DEFINE_int(experimental_agc,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the experimental AGC");
DEFINE_int(experimental_agc_disable_digital_adaptive,
kParameterNotSpecifiedValue,
"Force-deactivate (1) digital adaptation in "
"experimental AGC. Digital adaptation is active by default (0).");
DEFINE_int(experimental_agc_analyze_before_aec,
kParameterNotSpecifiedValue,
"Make level estimation happen before AEC"
" in the experimental AGC. After AEC is the default (0)");
DEFINE_int(
WEBRTC_DEFINE_string(dump_input, "", "Aec dump input filename");
WEBRTC_DEFINE_string(dump_output, "", "Aec dump output filename");
WEBRTC_DEFINE_string(i, "", "Forward stream input wav filename");
WEBRTC_DEFINE_string(o, "", "Forward stream output wav filename");
WEBRTC_DEFINE_string(ri, "", "Reverse stream input wav filename");
WEBRTC_DEFINE_string(ro, "", "Reverse stream output wav filename");
WEBRTC_DEFINE_string(artificial_nearend, "", "Artificial nearend wav filename");
WEBRTC_DEFINE_int(output_num_channels,
kParameterNotSpecifiedValue,
"Number of forward stream output channels");
WEBRTC_DEFINE_int(reverse_output_num_channels,
kParameterNotSpecifiedValue,
"Number of Reverse stream output channels");
WEBRTC_DEFINE_int(output_sample_rate_hz,
kParameterNotSpecifiedValue,
"Forward stream output sample rate in Hz");
WEBRTC_DEFINE_int(reverse_output_sample_rate_hz,
kParameterNotSpecifiedValue,
"Reverse stream output sample rate in Hz");
WEBRTC_DEFINE_bool(fixed_interface,
false,
"Use the fixed interface when operating on wav files");
WEBRTC_DEFINE_int(aec,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the echo canceller");
WEBRTC_DEFINE_int(aecm,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the mobile echo controller");
WEBRTC_DEFINE_int(ed,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate (0) the residual echo detector");
WEBRTC_DEFINE_string(ed_graph,
"",
"Output filename for graph of echo likelihood");
WEBRTC_DEFINE_int(agc,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the AGC");
WEBRTC_DEFINE_int(agc2,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the AGC2");
WEBRTC_DEFINE_int(pre_amplifier,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the pre amplifier");
WEBRTC_DEFINE_int(hpf,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the high-pass filter");
WEBRTC_DEFINE_int(ns,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the noise suppressor");
WEBRTC_DEFINE_int(ts,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the transient suppressor");
WEBRTC_DEFINE_int(vad,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the voice activity detector");
WEBRTC_DEFINE_int(le,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the level estimator");
WEBRTC_DEFINE_bool(
all_default,
false,
"Activate all of the default components (will be overridden by any "
"other settings)");
WEBRTC_DEFINE_int(aec_suppression_level,
kParameterNotSpecifiedValue,
"Set the aec suppression level (0-2)");
WEBRTC_DEFINE_int(delay_agnostic,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the AEC delay agnostic mode");
WEBRTC_DEFINE_int(extended_filter,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the AEC extended filter mode");
WEBRTC_DEFINE_int(
aec3,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the experimental AEC mode AEC3");
WEBRTC_DEFINE_int(experimental_agc,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the experimental AGC");
WEBRTC_DEFINE_int(
experimental_agc_disable_digital_adaptive,
kParameterNotSpecifiedValue,
"Force-deactivate (1) digital adaptation in "
"experimental AGC. Digital adaptation is active by default (0).");
WEBRTC_DEFINE_int(experimental_agc_analyze_before_aec,
kParameterNotSpecifiedValue,
"Make level estimation happen before AEC"
" in the experimental AGC. After AEC is the default (0)");
WEBRTC_DEFINE_int(
experimental_agc_agc2_level_estimator,
kParameterNotSpecifiedValue,
"AGC2 level estimation"
" in the experimental AGC. AGC1 level estimation is the default (0)");
DEFINE_int(
WEBRTC_DEFINE_int(
refined_adaptive_filter,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the refined adaptive filter functionality");
DEFINE_int(agc_mode, kParameterNotSpecifiedValue, "Specify the AGC mode (0-2)");
DEFINE_int(agc_target_level,
kParameterNotSpecifiedValue,
"Specify the AGC target level (0-31)");
DEFINE_int(agc_limiter,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the level estimator");
DEFINE_int(agc_compression_gain,
kParameterNotSpecifiedValue,
"Specify the AGC compression gain (0-90)");
DEFINE_float(agc2_enable_adaptive_gain,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the AGC2 adaptive gain");
DEFINE_float(agc2_fixed_gain_db, 0.f, "AGC2 fixed gain (dB) to apply");
DEFINE_float(pre_amplifier_gain_factor,
1.f,
"Pre-amplifier gain factor (linear) to apply");
DEFINE_int(vad_likelihood,
kParameterNotSpecifiedValue,
"Specify the VAD likelihood (0-3)");
DEFINE_int(ns_level, kParameterNotSpecifiedValue, "Specify the NS level (0-3)");
DEFINE_int(stream_delay,
kParameterNotSpecifiedValue,
"Specify the stream delay in ms to use");
DEFINE_int(use_stream_delay,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) reporting the stream delay");
DEFINE_int(stream_drift_samples,
kParameterNotSpecifiedValue,
"Specify the number of stream drift samples to use");
DEFINE_int(initial_mic_level, 100, "Initial mic level (0-255)");
DEFINE_int(simulate_mic_gain,
0,
"Activate (1) or deactivate(0) the analog mic gain simulation");
DEFINE_int(simulated_mic_kind,
kParameterNotSpecifiedValue,
"Specify which microphone kind to use for microphone simulation");
DEFINE_bool(performance_report, false, "Report the APM performance ");
DEFINE_bool(verbose, false, "Produce verbose output");
DEFINE_bool(quiet, false, "Avoid producing information about the progress.");
DEFINE_bool(bitexactness_report,
false,
"Report bitexactness for aec dump result reproduction");
DEFINE_bool(discard_settings_in_aecdump,
false,
"Discard any config settings specified in the aec dump");
DEFINE_bool(store_intermediate_output,
false,
"Creates new output files after each init");
DEFINE_string(custom_call_order_file, "", "Custom process API call order file");
DEFINE_bool(print_aec3_parameter_values,
false,
"Print parameter values used in AEC3 in JSON-format");
DEFINE_string(aec3_settings,
"",
"File in JSON-format with custom AEC3 settings");
DEFINE_bool(help, false, "Print this message");
WEBRTC_DEFINE_int(agc_mode,
kParameterNotSpecifiedValue,
"Specify the AGC mode (0-2)");
WEBRTC_DEFINE_int(agc_target_level,
kParameterNotSpecifiedValue,
"Specify the AGC target level (0-31)");
WEBRTC_DEFINE_int(agc_limiter,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the level estimator");
WEBRTC_DEFINE_int(agc_compression_gain,
kParameterNotSpecifiedValue,
"Specify the AGC compression gain (0-90)");
WEBRTC_DEFINE_float(agc2_enable_adaptive_gain,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) the AGC2 adaptive gain");
WEBRTC_DEFINE_float(agc2_fixed_gain_db, 0.f, "AGC2 fixed gain (dB) to apply");
WEBRTC_DEFINE_float(pre_amplifier_gain_factor,
1.f,
"Pre-amplifier gain factor (linear) to apply");
WEBRTC_DEFINE_int(vad_likelihood,
kParameterNotSpecifiedValue,
"Specify the VAD likelihood (0-3)");
WEBRTC_DEFINE_int(ns_level,
kParameterNotSpecifiedValue,
"Specify the NS level (0-3)");
WEBRTC_DEFINE_int(stream_delay,
kParameterNotSpecifiedValue,
"Specify the stream delay in ms to use");
WEBRTC_DEFINE_int(use_stream_delay,
kParameterNotSpecifiedValue,
"Activate (1) or deactivate(0) reporting the stream delay");
WEBRTC_DEFINE_int(stream_drift_samples,
kParameterNotSpecifiedValue,
"Specify the number of stream drift samples to use");
WEBRTC_DEFINE_int(initial_mic_level, 100, "Initial mic level (0-255)");
WEBRTC_DEFINE_int(
simulate_mic_gain,
0,
"Activate (1) or deactivate(0) the analog mic gain simulation");
WEBRTC_DEFINE_int(
simulated_mic_kind,
kParameterNotSpecifiedValue,
"Specify which microphone kind to use for microphone simulation");
WEBRTC_DEFINE_bool(performance_report, false, "Report the APM performance ");
WEBRTC_DEFINE_bool(verbose, false, "Produce verbose output");
WEBRTC_DEFINE_bool(quiet,
false,
"Avoid producing information about the progress.");
WEBRTC_DEFINE_bool(bitexactness_report,
false,
"Report bitexactness for aec dump result reproduction");
WEBRTC_DEFINE_bool(discard_settings_in_aecdump,
false,
"Discard any config settings specified in the aec dump");
WEBRTC_DEFINE_bool(store_intermediate_output,
false,
"Creates new output files after each init");
WEBRTC_DEFINE_string(custom_call_order_file,
"",
"Custom process API call order file");
WEBRTC_DEFINE_bool(print_aec3_parameter_values,
false,
"Print parameter values used in AEC3 in JSON-format");
WEBRTC_DEFINE_string(aec3_settings,
"",
"File in JSON-format with custom AEC3 settings");
WEBRTC_DEFINE_bool(help, false, "Print this message");
void SetSettingIfSpecified(const std::string& value,
absl::optional<std::string>* parameter) {