IWYU rtc_tools

Done by grepping for any <st*\.h> and removing them using
  find rtc_tools -name "*.h" -o -name "*.cc" | xargs sed -i '/<stdint.h>/d'
et al followed by
  find rtc_tools -name "*.h" -o -name "*.cc" | xargs tools_webrtc/iwyu/apply-include-cleaner
followed by
    tools_webrtc/gn_check_autofix.py -C out/Default/
and
  git cl format

rtc_tools/sanitizers_unittest.cc: changes reverted

Bug: webrtc:42226242
Change-Id: I306012b32f2554debe6bf9d8ec8092426da6d957
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/396681
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45087}
This commit is contained in:
Philipp Hancke 2025-07-02 10:22:21 -07:00 committed by WebRTC LUCI CQ
parent c508216d6a
commit 83b748da4f
50 changed files with 127 additions and 64 deletions

View File

@ -76,6 +76,7 @@ rtc_library("video_file_writer") {
"../api:scoped_refptr",
"../api/video:video_frame",
"../api/video:video_rtp_headers",
"../rtc_base:checks",
"../rtc_base:logging",
"//third_party/abseil-cpp/absl/strings",
]
@ -411,6 +412,7 @@ if (!build_with_chromium) {
"../api/video_codecs:scalability_mode",
"../rtc_base:checks",
"../rtc_base:stringutils",
"../rtc_base/system:file_wrapper",
"//api:create_frame_generator",
"//api:frame_generator_api",
"//api/environment",
@ -596,6 +598,7 @@ if (rtc_include_tests) {
deps = [
"../api:function_view",
"../api/audio:audio_frame_api",
"../common_audio",
"../modules/audio_processing",
"../modules/audio_processing:audioproc_debug_proto",

View File

@ -76,5 +76,6 @@ rtc_executable("data_channel_benchmark") {
"//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/flags:parse",
"//third_party/abseil-cpp/absl/strings:string_view",
"//third_party/abseil-cpp/absl/time",
]
}

View File

@ -0,0 +1,4 @@
include_rules = [
"+absl/time/clock.h",
"+absl/time/time.h",
]

View File

@ -20,6 +20,8 @@
#include <string>
#include <utility>
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "api/jsep.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"

View File

@ -10,10 +10,10 @@
#ifndef RTC_TOOLS_DATA_CHANNEL_BENCHMARK_GRPC_SIGNALING_H_
#define RTC_TOOLS_DATA_CHANNEL_BENCHMARK_GRPC_SIGNALING_H_
#include <functional>
#include <memory>
#include <string>
#include "api/jsep.h"
#include "rtc_tools/data_channel_benchmark/signaling_interface.h"
namespace webrtc {

View File

@ -10,8 +10,7 @@
#ifndef RTC_TOOLS_DATA_CHANNEL_BENCHMARK_PEER_CONNECTION_CLIENT_H_
#define RTC_TOOLS_DATA_CHANNEL_BENCHMARK_PEER_CONNECTION_CLIENT_H_
#include <stdint.h>
#include <cstdint>
#include <functional>
#include <memory>
#include <vector>

View File

@ -10,6 +10,7 @@
#ifndef RTC_TOOLS_DATA_CHANNEL_BENCHMARK_SIGNALING_INTERFACE_H_
#define RTC_TOOLS_DATA_CHANNEL_BENCHMARK_SIGNALING_INTERFACE_H_
#include <functional>
#include <memory>
#include "api/jsep.h"

View File

@ -8,11 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdio.h>
#include <stdlib.h>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/flags/flag.h"

View File

@ -10,14 +10,13 @@
#include "rtc_tools/frame_analyzer/linear_least_squares.h"
#include <math.h>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <functional>
#include <numeric>
#include <type_traits>
#include <utility>
#include <valarray>
#include <vector>
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"

View File

@ -11,8 +11,7 @@
#ifndef RTC_TOOLS_FRAME_ANALYZER_LINEAR_LEAST_SQUARES_H_
#define RTC_TOOLS_FRAME_ANALYZER_LINEAR_LEAST_SQUARES_H_
#include <stdint.h>
#include <cstdint>
#include <optional>
#include <valarray>
#include <vector>

View File

@ -10,7 +10,7 @@
#include "rtc_tools/frame_analyzer/linear_least_squares.h"
#include <cstdint>
#include <vector>
#include "test/gtest.h"

View File

@ -7,9 +7,8 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdio.h>
#include <stdlib.h>
#include <cstdlib>
#include <string>
#include "absl/flags/flag.h"

View File

@ -9,13 +9,16 @@
*/
#include "rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h"
#include <stdio.h>
#include <cstddef>
#include <cstdio>
#include <numeric>
#include <string>
#include <vector>
#include "api/scoped_refptr.h"
#include "api/video/video_frame_buffer.h"
#include "rtc_tools/frame_analyzer/video_quality_analysis.h"
#include "rtc_tools/video_file_reader.h"
#define STATS_LINE_LENGTH 28
#define PSNR_FREEZE_THRESHOLD 47

View File

@ -11,8 +11,7 @@
#ifndef RTC_TOOLS_FRAME_ANALYZER_REFERENCE_LESS_VIDEO_ANALYSIS_LIB_H_
#define RTC_TOOLS_FRAME_ANALYZER_REFERENCE_LESS_VIDEO_ANALYSIS_LIB_H_
#include <stddef.h>
#include <cstddef>
#include <string>
#include <vector>

View File

@ -10,18 +10,21 @@
#include "rtc_tools/frame_analyzer/video_color_aligner.h"
#include <stddef.h>
#include <algorithm>
#include <array>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <vector>
#include "api/array_view.h"
#include "api/make_ref_counted.h"
#include "api/scoped_refptr.h"
#include "api/video/i420_buffer.h"
#include "api/video/video_frame_buffer.h"
#include "rtc_base/checks.h"
#include "rtc_tools/frame_analyzer/linear_least_squares.h"
#include "rtc_tools/video_file_reader.h"
#include "third_party/libyuv/include/libyuv/planar_functions.h"
#include "third_party/libyuv/include/libyuv/scale.h"

View File

@ -10,9 +10,11 @@
#include "rtc_tools/frame_analyzer/video_color_aligner.h"
#include <stdint.h>
#include <cstdint>
#include "api/scoped_refptr.h"
#include "api/video/i420_buffer.h"
#include "api/video/video_frame_buffer.h"
#include "rtc_tools/frame_analyzer/video_quality_analysis.h"
#include "rtc_tools/video_file_reader.h"
#include "test/gtest.h"

View File

@ -10,12 +10,17 @@
#include "rtc_tools/frame_analyzer/video_geometry_aligner.h"
#include <cstddef>
#include <cstdint>
#include <map>
#include "api/make_ref_counted.h"
#include "api/scoped_refptr.h"
#include "api/video/i420_buffer.h"
#include "api/video/video_frame_buffer.h"
#include "rtc_base/checks.h"
#include "rtc_tools/frame_analyzer/video_quality_analysis.h"
#include "rtc_tools/video_file_reader.h"
#include "third_party/libyuv/include/libyuv/scale.h"
namespace webrtc {

View File

@ -11,6 +11,7 @@
#ifndef RTC_TOOLS_FRAME_ANALYZER_VIDEO_GEOMETRY_ALIGNER_H_
#define RTC_TOOLS_FRAME_ANALYZER_VIDEO_GEOMETRY_ALIGNER_H_
#include "api/scoped_refptr.h"
#include "api/video/video_frame_buffer.h"
#include "rtc_tools/video_file_reader.h"

View File

@ -10,9 +10,12 @@
#include "rtc_tools/frame_analyzer/video_geometry_aligner.h"
#include <cstdint>
#include <vector>
#include "api/scoped_refptr.h"
#include "api/video/i420_buffer.h"
#include "api/video/video_frame_buffer.h"
#include "rtc_tools/frame_analyzer/video_quality_analysis.h"
#include "rtc_tools/video_file_reader.h"
#include "test/gtest.h"

View File

@ -11,13 +11,17 @@
#include "rtc_tools/frame_analyzer/video_quality_analysis.h"
#include <algorithm>
#include <array>
#include <cstddef>
#include <string>
#include <vector>
#include "api/numerics/samples_stats_counter.h"
#include "api/scoped_refptr.h"
#include "api/test/metrics/metric.h"
#include "api/test/metrics/metrics_logger.h"
#include "api/video/video_frame_buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_tools/video_file_reader.h"
#include "third_party/libyuv/include/libyuv/compare.h"
namespace webrtc {

View File

@ -11,8 +11,7 @@
#ifndef RTC_TOOLS_FRAME_ANALYZER_VIDEO_QUALITY_ANALYSIS_H_
#define RTC_TOOLS_FRAME_ANALYZER_VIDEO_QUALITY_ANALYSIS_H_
#include <stdio.h>
#include <cstddef>
#include <string>
#include <vector>

View File

@ -9,6 +9,8 @@
*/
#include "rtc_tools/frame_analyzer/video_quality_analysis.h"
#include <cstdio>
#include <ostream>
#include <string>
#include <vector>

View File

@ -19,9 +19,11 @@
#include <vector>
#include "api/make_ref_counted.h"
#include "api/scoped_refptr.h"
#include "api/video/i420_buffer.h"
#include "api/video/video_frame_buffer.h"
#include "rtc_tools/frame_analyzer/video_quality_analysis.h"
#include "rtc_tools/video_file_reader.h"
namespace webrtc {
namespace test {

View File

@ -11,8 +11,7 @@
#ifndef RTC_TOOLS_FRAME_ANALYZER_VIDEO_TEMPORAL_ALIGNER_H_
#define RTC_TOOLS_FRAME_ANALYZER_VIDEO_TEMPORAL_ALIGNER_H_
#include <stddef.h>
#include <cstddef>
#include <vector>
#include "api/scoped_refptr.h"

View File

@ -11,7 +11,9 @@
#include "rtc_tools/frame_analyzer/video_temporal_aligner.h"
#include <cstddef>
#include <vector>
#include "api/scoped_refptr.h"
#include "rtc_tools/frame_analyzer/video_quality_analysis.h"
#include "rtc_tools/video_file_reader.h"
#include "test/gtest.h"

View File

@ -39,10 +39,12 @@ if (rtc_enable_protobuf) {
deps = [
":network_tester_config_proto",
":network_tester_packet_proto",
"../../api:scoped_refptr",
"../../api:sequence_checker",
"../../api/task_queue",
"../../api/task_queue:default_task_queue_factory",
"../../api/task_queue:pending_task_safety_flag",
"../../api/units:time_delta",
"../../api/units:timestamp",
"../../p2p:basic_packet_socket_factory",
"../../rtc_base:async_packet_socket",
@ -87,6 +89,7 @@ if (rtc_enable_protobuf) {
"../../rtc_base:gunit_helpers",
"../../rtc_base:random",
"../../rtc_base:threading",
"../../rtc_base:timeutils",
"../../test:fileutils",
"../../test:test_support",
"../../test:wait_until",

View File

@ -10,7 +10,9 @@
#include "rtc_tools/network_tester/config_reader.h"
#include <fstream>
#include <ios>
#include <iterator>
#include <optional>
#include <string>
#include "rtc_base/checks.h"

View File

@ -11,7 +11,6 @@
#ifndef RTC_TOOLS_NETWORK_TESTER_CONFIG_READER_H_
#define RTC_TOOLS_NETWORK_TESTER_CONFIG_READER_H_
#include <fstream>
#include <optional>
#include <string>

View File

@ -14,6 +14,8 @@
#include "api/test/rtc_error_matchers.h"
#include "rtc_base/random.h"
#include "rtc_base/thread.h"
#include "rtc_base/time_utils.h"
#include "rtc_tools/network_tester/test_controller.h"
#include "test/gmock.h"
#include "test/gtest.h"

View File

@ -9,6 +9,7 @@
*/
#include "rtc_tools/network_tester/packet_logger.h"
#include <ios>
#include <string>
#include "rtc_base/checks.h"

View File

@ -11,13 +11,19 @@
#include "rtc_tools/network_tester/packet_sender.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include "absl/functional/any_invocable.h"
#include "api/scoped_refptr.h"
#include "api/sequence_checker.h"
#include "api/task_queue/pending_task_safety_flag.h"
#include "api/task_queue/task_queue_base.h"
#include "api/units/time_delta.h"
#include "rtc_base/time_utils.h"
#include "rtc_tools/network_tester/config_reader.h"
#include "rtc_tools/network_tester/test_controller.h"

View File

@ -11,13 +11,16 @@
#ifndef RTC_TOOLS_NETWORK_TESTER_PACKET_SENDER_H_
#define RTC_TOOLS_NETWORK_TESTER_PACKET_SENDER_H_
#include <memory>
#include <cstddef>
#include <cstdint>
#include <string>
#include "api/scoped_refptr.h"
#include "api/sequence_checker.h"
#include "api/task_queue/pending_task_safety_flag.h"
#include "api/task_queue/task_queue_factory.h"
#include "api/task_queue/task_queue_base.h"
#include "rtc_base/system/no_unique_address.h"
#include "rtc_base/thread_annotations.h"
#ifdef WEBRTC_NETWORK_TESTER_PROTO
#include "rtc_tools/network_tester/network_tester_packet.pb.h"

View File

@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <memory>
#include "rtc_base/null_socket_server.h"
#include "rtc_base/thread.h"
#include "rtc_tools/network_tester/test_controller.h"

View File

@ -11,15 +11,15 @@
#ifndef RTC_TOOLS_NETWORK_TESTER_TEST_CONTROLLER_H_
#define RTC_TOOLS_NETWORK_TESTER_TEST_CONTROLLER_H_
#include <stddef.h>
#include <stdint.h>
#include <array>
#include <cstddef>
#include <memory>
#include <optional>
#include <string>
#include "api/scoped_refptr.h"
#include "api/sequence_checker.h"
#include "api/task_queue/pending_task_safety_flag.h"
#include "p2p/base/basic_packet_socket_factory.h"
#include "rtc_base/async_packet_socket.h"
#include "rtc_base/network/received_packet.h"

View File

@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <cstddef>
#include <cstdio>
#include <string>
#include "absl/flags/flag.h"

View File

@ -10,8 +10,7 @@
#include "rtc_tools/rtc_event_log_to_text/converter.h"
#include <inttypes.h>
#include <cinttypes>
#include <cstdio>
#include <map>
#include <string>

View File

@ -11,8 +11,7 @@
#ifndef RTC_TOOLS_RTC_EVENT_LOG_TO_TEXT_CONVERTER_H_
#define RTC_TOOLS_RTC_EVENT_LOG_TO_TEXT_CONVERTER_H_
#include <stdio.h>
#include <cstdio>
#include <string>
#include "absl/base/attributes.h"

View File

@ -8,8 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdio.h>
#include <cstdio>
#include <string>
#include <vector>

View File

@ -10,10 +10,9 @@
#include "rtc_tools/rtc_event_log_visualizer/alerts.h"
#include <stdio.h>
#include <algorithm>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <map>

View File

@ -11,8 +11,7 @@
#ifndef RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_ALERTS_H_
#define RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_ALERTS_H_
#include <stdio.h>
#include <cstdio>
#include <functional>
#include <map>
#include <string>

View File

@ -8,8 +8,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdio.h>
#include <string.h>
#include <cstdio>
#include <fstream>

View File

@ -13,20 +13,21 @@
// The debug files are dumped as protobuf blobs. For analysis, it's necessary
// to unpack the file into its component parts: audio and other data.
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <cinttypes>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <limits>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
#include "api/audio/audio_view.h"
#include "api/function_view.h"
#include "common_audio/channel_buffer.h"
#include "common_audio/include/audio_util.h"
#include "common_audio/wav_file.h"
#include "modules/audio_processing/test/protobuf_utils.h"
#include "rtc_base/checks.h"

View File

@ -9,8 +9,20 @@
*/
#include "rtc_tools/video_encoder/encoded_image_file_writer.h"
#include <cstddef>
#include <optional>
#include <utility>
#include "api/video/encoded_image.h"
#include "api/video/video_frame_type.h"
#include "api/video_codecs/scalability_mode.h"
#include "api/video_codecs/video_codec.h"
#include "modules/video_coding/svc/scalability_mode_util.h"
#include "modules/video_coding/utility/ivf_file_writer.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/strings/string_builder.h"
#include "rtc_base/system/file_wrapper.h"
namespace webrtc {
namespace test {

View File

@ -15,7 +15,8 @@
#include <utility>
#include <vector>
#include "modules/video_coding/include/video_codec_interface.h"
#include "api/video/encoded_image.h"
#include "api/video_codecs/video_codec.h"
#include "modules/video_coding/utility/ivf_file_writer.h"
namespace webrtc {

View File

@ -10,14 +10,19 @@
#include "rtc_tools/video_file_reader.h"
#include <array>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <optional>
#include <string>
#include <vector>
#include "absl/strings/match.h"
#include "api/make_ref_counted.h"
#include "api/scoped_refptr.h"
#include "api/video/i420_buffer.h"
#include "api/video/video_frame_buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/string_encode.h"

View File

@ -10,8 +10,7 @@
#ifndef RTC_TOOLS_VIDEO_FILE_READER_H_
#define RTC_TOOLS_VIDEO_FILE_READER_H_
#include <stddef.h>
#include <cstddef>
#include <cstdio>
#include <iterator>
#include <string>

View File

@ -10,10 +10,11 @@
#include "rtc_tools/video_file_reader.h"
#include <stdint.h>
#include <cstdio>
#include <string>
#include "api/scoped_refptr.h"
#include "api/video/video_frame_buffer.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"

View File

@ -10,14 +10,16 @@
#include "rtc_tools/video_file_writer.h"
#include <stdint.h>
#include <cstdint>
#include <cstdio>
#include <string>
#include "absl/strings/match.h"
#include "api/scoped_refptr.h"
#include "api/video/video_frame_buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_tools/video_file_reader.h"
namespace webrtc {
namespace test {

View File

@ -10,11 +10,10 @@
#include "rtc_tools/video_file_writer.h"
#include <stdint.h>
#include <cstdio>
#include <string>
#include "api/scoped_refptr.h"
#include "api/video/video_frame_buffer.h"
#include "rtc_tools/video_file_reader.h"
#include "test/gtest.h"

View File

@ -8,9 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdio.h>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <map>