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/rtc_tools/agc/activity_metric.cc b/rtc_tools/agc/activity_metric.cc
index b4ed3fa..9b2276f 100644
--- a/rtc_tools/agc/activity_metric.cc
+++ b/rtc_tools/agc/activity_metric.cc
@@ -30,32 +30,34 @@
static const int kAgcAnalWindowSamples = 100;
static const float kDefaultActivityThreshold = 0.3f;
-DEFINE_bool(standalone_vad, true, "enable stand-alone VAD");
-DEFINE_string(true_vad,
- "",
- "name of a file containing true VAD in 'int'"
- " format");
-DEFINE_string(video_vad,
- "",
- "name of a file containing video VAD (activity"
- " probabilities) in double format. One activity per 10ms is"
- " required. If no file is given the video information is not"
- " incorporated. Negative activity is interpreted as video is"
- " not adapted and the statistics are not computed during"
- " the learning phase. Note that the negative video activities"
- " are ONLY allowed at the beginning.");
-DEFINE_string(result,
- "",
- "name of a file to write the results. The results"
- " will be appended to the end of the file. This is optional.");
-DEFINE_string(audio_content,
- "",
- "name of a file where audio content is written"
- " to, in double format.");
-DEFINE_float(activity_threshold,
- kDefaultActivityThreshold,
- "Activity threshold");
-DEFINE_bool(help, false, "prints this message");
+WEBRTC_DEFINE_bool(standalone_vad, true, "enable stand-alone VAD");
+WEBRTC_DEFINE_string(true_vad,
+ "",
+ "name of a file containing true VAD in 'int'"
+ " format");
+WEBRTC_DEFINE_string(
+ video_vad,
+ "",
+ "name of a file containing video VAD (activity"
+ " probabilities) in double format. One activity per 10ms is"
+ " required. If no file is given the video information is not"
+ " incorporated. Negative activity is interpreted as video is"
+ " not adapted and the statistics are not computed during"
+ " the learning phase. Note that the negative video activities"
+ " are ONLY allowed at the beginning.");
+WEBRTC_DEFINE_string(
+ result,
+ "",
+ "name of a file to write the results. The results"
+ " will be appended to the end of the file. This is optional.");
+WEBRTC_DEFINE_string(audio_content,
+ "",
+ "name of a file where audio content is written"
+ " to, in double format.");
+WEBRTC_DEFINE_float(activity_threshold,
+ kDefaultActivityThreshold,
+ "Activity threshold");
+WEBRTC_DEFINE_bool(help, false, "prints this message");
namespace webrtc {
diff --git a/rtc_tools/event_log_visualizer/main.cc b/rtc_tools/event_log_visualizer/main.cc
index 2a52d06..ad90cfb 100644
--- a/rtc_tools/event_log_visualizer/main.cc
+++ b/rtc_tools/event_log_visualizer/main.cc
@@ -20,151 +20,173 @@
#include "test/field_trial.h"
#include "test/testsupport/fileutils.h"
-DEFINE_string(plot_profile,
- "default",
- "A profile that selects a certain subset of the plots. Currently "
- "defined profiles are \"all\", \"none\", \"sendside_bwe\","
- "\"receiveside_bwe\" and \"default\"");
+WEBRTC_DEFINE_string(
+ plot_profile,
+ "default",
+ "A profile that selects a certain subset of the plots. Currently "
+ "defined profiles are \"all\", \"none\", \"sendside_bwe\","
+ "\"receiveside_bwe\" and \"default\"");
-DEFINE_bool(plot_incoming_packet_sizes,
- false,
- "Plot bar graph showing the size of each incoming packet.");
-DEFINE_bool(plot_outgoing_packet_sizes,
- false,
- "Plot bar graph showing the size of each outgoing packet.");
-DEFINE_bool(plot_incoming_packet_count,
- false,
- "Plot the accumulated number of packets for each incoming stream.");
-DEFINE_bool(plot_outgoing_packet_count,
- false,
- "Plot the accumulated number of packets for each outgoing stream.");
-DEFINE_bool(plot_audio_playout,
- false,
- "Plot bar graph showing the time between each audio playout.");
-DEFINE_bool(plot_audio_level,
- false,
- "Plot line graph showing the audio level of incoming audio.");
-DEFINE_bool(plot_incoming_sequence_number_delta,
- false,
- "Plot the sequence number difference between consecutive incoming "
- "packets.");
-DEFINE_bool(
+WEBRTC_DEFINE_bool(plot_incoming_packet_sizes,
+ false,
+ "Plot bar graph showing the size of each incoming packet.");
+WEBRTC_DEFINE_bool(plot_outgoing_packet_sizes,
+ false,
+ "Plot bar graph showing the size of each outgoing packet.");
+WEBRTC_DEFINE_bool(
+ plot_incoming_packet_count,
+ false,
+ "Plot the accumulated number of packets for each incoming stream.");
+WEBRTC_DEFINE_bool(
+ plot_outgoing_packet_count,
+ false,
+ "Plot the accumulated number of packets for each outgoing stream.");
+WEBRTC_DEFINE_bool(
+ plot_audio_playout,
+ false,
+ "Plot bar graph showing the time between each audio playout.");
+WEBRTC_DEFINE_bool(
+ plot_audio_level,
+ false,
+ "Plot line graph showing the audio level of incoming audio.");
+WEBRTC_DEFINE_bool(
+ plot_incoming_sequence_number_delta,
+ false,
+ "Plot the sequence number difference between consecutive incoming "
+ "packets.");
+WEBRTC_DEFINE_bool(
plot_incoming_delay_delta,
false,
"Plot the difference in 1-way path delay between consecutive packets.");
-DEFINE_bool(plot_incoming_delay,
- true,
- "Plot the 1-way path delay for incoming packets, normalized so "
- "that the first packet has delay 0.");
-DEFINE_bool(plot_incoming_loss_rate,
- true,
- "Compute the loss rate for incoming packets using a method that's "
- "similar to the one used for RTCP SR and RR fraction lost. Note "
- "that the loss rate can be negative if packets are duplicated or "
- "reordered.");
-DEFINE_bool(plot_incoming_bitrate,
- true,
- "Plot the total bitrate used by all incoming streams.");
-DEFINE_bool(plot_outgoing_bitrate,
- true,
- "Plot the total bitrate used by all outgoing streams.");
-DEFINE_bool(plot_incoming_stream_bitrate,
- true,
- "Plot the bitrate used by each incoming stream.");
-DEFINE_bool(plot_outgoing_stream_bitrate,
- true,
- "Plot the bitrate used by each outgoing stream.");
-DEFINE_bool(plot_simulated_receiveside_bwe,
- false,
- "Run the receive-side bandwidth estimator with the incoming rtp "
- "packets and plot the resulting estimate.");
-DEFINE_bool(plot_simulated_sendside_bwe,
- false,
- "Run the send-side bandwidth estimator with the outgoing rtp and "
- "incoming rtcp and plot the resulting estimate.");
-DEFINE_bool(plot_network_delay_feedback,
- true,
- "Compute network delay based on sent packets and the received "
- "transport feedback.");
-DEFINE_bool(plot_fraction_loss_feedback,
- true,
- "Plot packet loss in percent for outgoing packets (as perceived by "
- "the send-side bandwidth estimator).");
-DEFINE_bool(plot_pacer_delay,
- false,
- "Plot the time each sent packet has spent in the pacer (based on "
- "the difference between the RTP timestamp and the send "
- "timestamp).");
-DEFINE_bool(plot_timestamps,
- false,
- "Plot the rtp timestamps of all rtp and rtcp packets over time.");
-DEFINE_bool(plot_rtcp_details,
- false,
- "Plot the contents of all report blocks in all sender and receiver "
- "reports. This includes fraction lost, cumulative number of lost "
- "packets, extended highest sequence number and time since last "
- "received SR.");
-DEFINE_bool(plot_audio_encoder_bitrate_bps,
- false,
- "Plot the audio encoder target bitrate.");
-DEFINE_bool(plot_audio_encoder_frame_length_ms,
- false,
- "Plot the audio encoder frame length.");
-DEFINE_bool(
+WEBRTC_DEFINE_bool(
+ plot_incoming_delay,
+ true,
+ "Plot the 1-way path delay for incoming packets, normalized so "
+ "that the first packet has delay 0.");
+WEBRTC_DEFINE_bool(
+ plot_incoming_loss_rate,
+ true,
+ "Compute the loss rate for incoming packets using a method that's "
+ "similar to the one used for RTCP SR and RR fraction lost. Note "
+ "that the loss rate can be negative if packets are duplicated or "
+ "reordered.");
+WEBRTC_DEFINE_bool(plot_incoming_bitrate,
+ true,
+ "Plot the total bitrate used by all incoming streams.");
+WEBRTC_DEFINE_bool(plot_outgoing_bitrate,
+ true,
+ "Plot the total bitrate used by all outgoing streams.");
+WEBRTC_DEFINE_bool(plot_incoming_stream_bitrate,
+ true,
+ "Plot the bitrate used by each incoming stream.");
+WEBRTC_DEFINE_bool(plot_outgoing_stream_bitrate,
+ true,
+ "Plot the bitrate used by each outgoing stream.");
+WEBRTC_DEFINE_bool(
+ plot_simulated_receiveside_bwe,
+ false,
+ "Run the receive-side bandwidth estimator with the incoming rtp "
+ "packets and plot the resulting estimate.");
+WEBRTC_DEFINE_bool(
+ plot_simulated_sendside_bwe,
+ false,
+ "Run the send-side bandwidth estimator with the outgoing rtp and "
+ "incoming rtcp and plot the resulting estimate.");
+WEBRTC_DEFINE_bool(
+ plot_network_delay_feedback,
+ true,
+ "Compute network delay based on sent packets and the received "
+ "transport feedback.");
+WEBRTC_DEFINE_bool(
+ plot_fraction_loss_feedback,
+ true,
+ "Plot packet loss in percent for outgoing packets (as perceived by "
+ "the send-side bandwidth estimator).");
+WEBRTC_DEFINE_bool(
+ plot_pacer_delay,
+ false,
+ "Plot the time each sent packet has spent in the pacer (based on "
+ "the difference between the RTP timestamp and the send "
+ "timestamp).");
+WEBRTC_DEFINE_bool(
+ plot_timestamps,
+ false,
+ "Plot the rtp timestamps of all rtp and rtcp packets over time.");
+WEBRTC_DEFINE_bool(
+ plot_rtcp_details,
+ false,
+ "Plot the contents of all report blocks in all sender and receiver "
+ "reports. This includes fraction lost, cumulative number of lost "
+ "packets, extended highest sequence number and time since last "
+ "received SR.");
+WEBRTC_DEFINE_bool(plot_audio_encoder_bitrate_bps,
+ false,
+ "Plot the audio encoder target bitrate.");
+WEBRTC_DEFINE_bool(plot_audio_encoder_frame_length_ms,
+ false,
+ "Plot the audio encoder frame length.");
+WEBRTC_DEFINE_bool(
plot_audio_encoder_packet_loss,
false,
"Plot the uplink packet loss fraction which is sent to the audio encoder.");
-DEFINE_bool(plot_audio_encoder_fec, false, "Plot the audio encoder FEC.");
-DEFINE_bool(plot_audio_encoder_dtx, false, "Plot the audio encoder DTX.");
-DEFINE_bool(plot_audio_encoder_num_channels,
- false,
- "Plot the audio encoder number of channels.");
-DEFINE_bool(plot_neteq_stats, false, "Plot the NetEq statistics.");
-DEFINE_bool(plot_ice_candidate_pair_config,
- false,
- "Plot the ICE candidate pair config events.");
-DEFINE_bool(plot_ice_connectivity_check,
- false,
- "Plot the ICE candidate pair connectivity checks.");
+WEBRTC_DEFINE_bool(plot_audio_encoder_fec,
+ false,
+ "Plot the audio encoder FEC.");
+WEBRTC_DEFINE_bool(plot_audio_encoder_dtx,
+ false,
+ "Plot the audio encoder DTX.");
+WEBRTC_DEFINE_bool(plot_audio_encoder_num_channels,
+ false,
+ "Plot the audio encoder number of channels.");
+WEBRTC_DEFINE_bool(plot_neteq_stats, false, "Plot the NetEq statistics.");
+WEBRTC_DEFINE_bool(plot_ice_candidate_pair_config,
+ false,
+ "Plot the ICE candidate pair config events.");
+WEBRTC_DEFINE_bool(plot_ice_connectivity_check,
+ false,
+ "Plot the ICE candidate pair connectivity checks.");
-DEFINE_string(
+WEBRTC_DEFINE_string(
force_fieldtrials,
"",
"Field trials control experimental feature code which can be forced. "
"E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enabled/"
" will assign the group Enabled to field trial WebRTC-FooFeature. Multiple "
"trials are separated by \"/\"");
-DEFINE_string(wav_filename,
- "",
- "Path to wav file used for simulation of jitter buffer");
-DEFINE_bool(help, false, "prints this message");
+WEBRTC_DEFINE_string(wav_filename,
+ "",
+ "Path to wav file used for simulation of jitter buffer");
+WEBRTC_DEFINE_bool(help, false, "prints this message");
-DEFINE_bool(show_detector_state,
- false,
- "Show the state of the delay based BWE detector on the total "
- "bitrate graph");
+WEBRTC_DEFINE_bool(
+ show_detector_state,
+ false,
+ "Show the state of the delay based BWE detector on the total "
+ "bitrate graph");
-DEFINE_bool(show_alr_state,
- false,
- "Show the state ALR state on the total bitrate graph");
+WEBRTC_DEFINE_bool(show_alr_state,
+ false,
+ "Show the state ALR state on the total bitrate graph");
-DEFINE_bool(parse_unconfigured_header_extensions,
- true,
- "Attempt to parse unconfigured header extensions using the default "
- "WebRTC mapping. This can give very misleading results if the "
- "application negotiates a different mapping.");
+WEBRTC_DEFINE_bool(
+ parse_unconfigured_header_extensions,
+ true,
+ "Attempt to parse unconfigured header extensions using the default "
+ "WebRTC mapping. This can give very misleading results if the "
+ "application negotiates a different mapping.");
-DEFINE_bool(print_triage_alerts,
- false,
- "Print triage alerts, i.e. a list of potential problems.");
+WEBRTC_DEFINE_bool(print_triage_alerts,
+ false,
+ "Print triage alerts, i.e. a list of potential problems.");
-DEFINE_bool(normalize_time,
- true,
- "Normalize the log timestamps so that the call starts at time 0.");
+WEBRTC_DEFINE_bool(
+ normalize_time,
+ true,
+ "Normalize the log timestamps so that the call starts at time 0.");
-DEFINE_bool(protobuf_output,
- false,
- "Output charts as protobuf instead of python code.");
+WEBRTC_DEFINE_bool(protobuf_output,
+ false,
+ "Output charts as protobuf instead of python code.");
void SetAllPlotFlags(bool setting);
diff --git a/rtc_tools/unpack_aecdump/unpack.cc b/rtc_tools/unpack_aecdump/unpack.cc
index af8bf31..142b497 100644
--- a/rtc_tools/unpack_aecdump/unpack.cc
+++ b/rtc_tools/unpack_aecdump/unpack.cc
@@ -29,27 +29,34 @@
RTC_POP_IGNORING_WUNDEF()
// TODO(andrew): unpack more of the data.
-DEFINE_string(input_file, "input", "The name of the input stream file.");
-DEFINE_string(output_file,
- "ref_out",
- "The name of the reference output stream file.");
-DEFINE_string(reverse_file,
- "reverse",
- "The name of the reverse input stream file.");
-DEFINE_string(delay_file, "delay.int32", "The name of the delay file.");
-DEFINE_string(drift_file, "drift.int32", "The name of the drift file.");
-DEFINE_string(level_file, "level.int32", "The name of the level file.");
-DEFINE_string(keypress_file, "keypress.bool", "The name of the keypress file.");
-DEFINE_string(callorder_file,
- "callorder",
- "The name of the render/capture call order file.");
-DEFINE_string(settings_file, "settings.txt", "The name of the settings file.");
-DEFINE_bool(full, false, "Unpack the full set of files (normally not needed).");
-DEFINE_bool(raw, false, "Write raw data instead of a WAV file.");
-DEFINE_bool(text,
- false,
- "Write non-audio files as text files instead of binary files.");
-DEFINE_bool(help, false, "Print this message.");
+WEBRTC_DEFINE_string(input_file, "input", "The name of the input stream file.");
+WEBRTC_DEFINE_string(output_file,
+ "ref_out",
+ "The name of the reference output stream file.");
+WEBRTC_DEFINE_string(reverse_file,
+ "reverse",
+ "The name of the reverse input stream file.");
+WEBRTC_DEFINE_string(delay_file, "delay.int32", "The name of the delay file.");
+WEBRTC_DEFINE_string(drift_file, "drift.int32", "The name of the drift file.");
+WEBRTC_DEFINE_string(level_file, "level.int32", "The name of the level file.");
+WEBRTC_DEFINE_string(keypress_file,
+ "keypress.bool",
+ "The name of the keypress file.");
+WEBRTC_DEFINE_string(callorder_file,
+ "callorder",
+ "The name of the render/capture call order file.");
+WEBRTC_DEFINE_string(settings_file,
+ "settings.txt",
+ "The name of the settings file.");
+WEBRTC_DEFINE_bool(full,
+ false,
+ "Unpack the full set of files (normally not needed).");
+WEBRTC_DEFINE_bool(raw, false, "Write raw data instead of a WAV file.");
+WEBRTC_DEFINE_bool(
+ text,
+ false,
+ "Write non-audio files as text files instead of binary files.");
+WEBRTC_DEFINE_bool(help, false, "Print this message.");
#define PRINT_CONFIG(field_name) \
if (msg.has_##field_name()) { \