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}
diff --git a/modules/audio_processing/agc2/rnn_vad/rnn_vad_tool.cc b/modules/audio_processing/agc2/rnn_vad/rnn_vad_tool.cc
index 5fba0bf..b66dfd6 100644
--- a/modules/audio_processing/agc2/rnn_vad/rnn_vad_tool.cc
+++ b/modules/audio_processing/agc2/rnn_vad/rnn_vad_tool.cc
@@ -25,22 +25,22 @@
namespace test {
namespace {
-DEFINE_string(i, "", "Path to the input wav file");
+WEBRTC_DEFINE_string(i, "", "Path to the input wav file");
std::string InputWavFile() {
return static_cast<std::string>(FLAG_i);
}
-DEFINE_string(f, "", "Path to the output features file");
+WEBRTC_DEFINE_string(f, "", "Path to the output features file");
std::string OutputFeaturesFile() {
return static_cast<std::string>(FLAG_f);
}
-DEFINE_string(o, "", "Path to the output VAD probabilities file");
+WEBRTC_DEFINE_string(o, "", "Path to the output VAD probabilities file");
std::string OutputVadProbsFile() {
return static_cast<std::string>(FLAG_o);
}
-DEFINE_bool(help, false, "Prints this message");
+WEBRTC_DEFINE_bool(help, false, "Prints this message");
} // namespace
diff --git a/modules/audio_processing/test/audioproc_float_impl.cc b/modules/audio_processing/test/audioproc_float_impl.cc
index 3a44887..e3f5004 100644
--- a/modules/audio_processing/test/audioproc_float_impl.cc
+++ b/modules/audio_processing/test/audioproc_float_impl.cc
@@ -37,155 +37,170 @@
"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) {
diff --git a/modules/audio_processing/test/conversational_speech/generator.cc b/modules/audio_processing/test/conversational_speech/generator.cc
index 741a1ca..fa561cf 100644
--- a/modules/audio_processing/test/conversational_speech/generator.cc
+++ b/modules/audio_processing/test/conversational_speech/generator.cc
@@ -32,10 +32,10 @@
"Command-line tool to generate multiple-end audio tracks to simulate "
"conversational speech with two or more participants.\n";
-DEFINE_string(i, "", "Directory containing the speech turn wav files");
-DEFINE_string(t, "", "Path to the timing text file");
-DEFINE_string(o, "", "Output wav files destination path");
-DEFINE_bool(help, false, "Prints this message");
+WEBRTC_DEFINE_string(i, "", "Directory containing the speech turn wav files");
+WEBRTC_DEFINE_string(t, "", "Path to the timing text file");
+WEBRTC_DEFINE_string(o, "", "Output wav files destination path");
+WEBRTC_DEFINE_bool(help, false, "Prints this message");
} // namespace
diff --git a/modules/audio_processing/test/py_quality_assessment/quality_assessment/apm_vad.cc b/modules/audio_processing/test/py_quality_assessment/quality_assessment/apm_vad.cc
index a6184b5..4b6ada2 100644
--- a/modules/audio_processing/test/py_quality_assessment/quality_assessment/apm_vad.cc
+++ b/modules/audio_processing/test/py_quality_assessment/quality_assessment/apm_vad.cc
@@ -24,9 +24,9 @@
constexpr size_t kMaxFrameLen =
kAudioFrameLengthMilliseconds * kMaxSampleRate / 1000;
-DEFINE_string(i, "", "Input wav file");
-DEFINE_string(o_probs, "", "VAD probabilities output file");
-DEFINE_string(o_rms, "", "VAD output file");
+WEBRTC_DEFINE_string(i, "", "Input wav file");
+WEBRTC_DEFINE_string(o_probs, "", "VAD probabilities output file");
+WEBRTC_DEFINE_string(o_rms, "", "VAD output file");
int main(int argc, char* argv[]) {
if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true))
diff --git a/modules/audio_processing/test/py_quality_assessment/quality_assessment/sound_level.cc b/modules/audio_processing/test/py_quality_assessment/quality_assessment/sound_level.cc
index 98cf84c..35a2c11 100644
--- a/modules/audio_processing/test/py_quality_assessment/quality_assessment/sound_level.cc
+++ b/modules/audio_processing/test/py_quality_assessment/quality_assessment/sound_level.cc
@@ -26,13 +26,13 @@
const double kOneDbReduction = DbToRatio(-1.0);
-DEFINE_string(i, "", "Input wav file");
-DEFINE_string(oc, "", "Config output file");
-DEFINE_string(ol, "", "Levels output file");
-DEFINE_float(a, 5.f, "Attack (ms)");
-DEFINE_float(d, 20.f, "Decay (ms)");
-DEFINE_int(f, 10, "Frame length (ms)");
-DEFINE_bool(help, false, "prints this message");
+WEBRTC_DEFINE_string(i, "", "Input wav file");
+WEBRTC_DEFINE_string(oc, "", "Config output file");
+WEBRTC_DEFINE_string(ol, "", "Levels output file");
+WEBRTC_DEFINE_float(a, 5.f, "Attack (ms)");
+WEBRTC_DEFINE_float(d, 20.f, "Decay (ms)");
+WEBRTC_DEFINE_int(f, 10, "Frame length (ms)");
+WEBRTC_DEFINE_bool(help, false, "prints this message");
int main(int argc, char* argv[]) {
if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true)) {
diff --git a/modules/audio_processing/test/py_quality_assessment/quality_assessment/vad.cc b/modules/audio_processing/test/py_quality_assessment/quality_assessment/vad.cc
index 191cb1e..8a134ed 100644
--- a/modules/audio_processing/test/py_quality_assessment/quality_assessment/vad.cc
+++ b/modules/audio_processing/test/py_quality_assessment/quality_assessment/vad.cc
@@ -27,8 +27,8 @@
constexpr uint8_t kBitmaskBuffSize = 8;
-DEFINE_string(i, "", "Input wav file");
-DEFINE_string(o, "", "VAD output file");
+WEBRTC_DEFINE_string(i, "", "Input wav file");
+WEBRTC_DEFINE_string(o, "", "VAD output file");
int main(int argc, char* argv[]) {
if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true))
diff --git a/modules/audio_processing/transient/transient_suppression_test.cc b/modules/audio_processing/transient/transient_suppression_test.cc
index 9e7ecd5..e15f69c 100644
--- a/modules/audio_processing/transient/transient_suppression_test.cc
+++ b/modules/audio_processing/transient/transient_suppression_test.cc
@@ -23,26 +23,28 @@
#include "test/gtest.h"
#include "test/testsupport/fileutils.h"
-DEFINE_string(in_file_name, "", "PCM file that contains the signal.");
-DEFINE_string(detection_file_name,
- "",
- "PCM file that contains the detection signal.");
-DEFINE_string(reference_file_name,
- "",
- "PCM file that contains the reference signal.");
+WEBRTC_DEFINE_string(in_file_name, "", "PCM file that contains the signal.");
+WEBRTC_DEFINE_string(detection_file_name,
+ "",
+ "PCM file that contains the detection signal.");
+WEBRTC_DEFINE_string(reference_file_name,
+ "",
+ "PCM file that contains the reference signal.");
-DEFINE_int(chunk_size_ms,
- 10,
- "Time between each chunk of samples in milliseconds.");
+WEBRTC_DEFINE_int(chunk_size_ms,
+ 10,
+ "Time between each chunk of samples in milliseconds.");
-DEFINE_int(sample_rate_hz, 16000, "Sampling frequency of the signal in Hertz.");
-DEFINE_int(detection_rate_hz,
- 0,
- "Sampling frequency of the detection signal in Hertz.");
+WEBRTC_DEFINE_int(sample_rate_hz,
+ 16000,
+ "Sampling frequency of the signal in Hertz.");
+WEBRTC_DEFINE_int(detection_rate_hz,
+ 0,
+ "Sampling frequency of the detection signal in Hertz.");
-DEFINE_int(num_channels, 1, "Number of channels.");
+WEBRTC_DEFINE_int(num_channels, 1, "Number of channels.");
-DEFINE_bool(help, false, "Print this message.");
+WEBRTC_DEFINE_bool(help, false, "Print this message.");
namespace webrtc {