IWYU modules/ partially and remove legacy ECN alias using find modules -name "*.h" -o -name "*.cc" | xargs tools_webrtc/iwyu/apply-include-cleaner followed by a revert of platform-specific modules which will be done separately followed by tools_webrtc/gn_check_autofix.py -C out/Default/ followed by git cl format Then manually remove the backward compat rtc_base/network/ecn_marking.h and update the dependencies. Bug: webrtc:42226242 No-Iwyu: platform-specific code in socket_server Change-Id: Ifb950b7c28ecc644c4de3b53b8dade9dc36f271c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/397920 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Philipp Hancke <phancke@meta.com> Cr-Commit-Position: refs/heads/main@{#45079}
diff --git a/modules/async_audio_processing/BUILD.gn b/modules/async_audio_processing/BUILD.gn index 0a8fc58..97da683 100644 --- a/modules/async_audio_processing/BUILD.gn +++ b/modules/async_audio_processing/BUILD.gn
@@ -17,6 +17,7 @@ public = [ "async_audio_processing.h" ] deps = [ + "../../api:ref_count", "../../api:scoped_refptr", "../../api:sequence_checker", "../../api/audio:audio_frame_api",
diff --git a/modules/async_audio_processing/async_audio_processing.cc b/modules/async_audio_processing/async_audio_processing.cc index d61b126..eb62853 100644 --- a/modules/async_audio_processing/async_audio_processing.cc +++ b/modules/async_audio_processing/async_audio_processing.cc
@@ -10,11 +10,12 @@ */ #include "modules/async_audio_processing/async_audio_processing.h" +#include <memory> #include <utility> #include "api/audio/audio_frame.h" +#include "api/audio/audio_frame_processor.h" #include "api/task_queue/task_queue_factory.h" -#include "rtc_base/checks.h" namespace webrtc {
diff --git a/modules/async_audio_processing/async_audio_processing.h b/modules/async_audio_processing/async_audio_processing.h index c5a28cf..43bb90f 100644 --- a/modules/async_audio_processing/async_audio_processing.h +++ b/modules/async_audio_processing/async_audio_processing.h
@@ -14,8 +14,8 @@ #include <memory> #include "api/audio/audio_frame_processor.h" +#include "api/ref_count.h" #include "api/task_queue/task_queue_base.h" -#include "rtc_base/ref_count.h" namespace webrtc {
diff --git a/modules/remote_bitrate_estimator/BUILD.gn b/modules/remote_bitrate_estimator/BUILD.gn index e91216f..b71dfe4 100644 --- a/modules/remote_bitrate_estimator/BUILD.gn +++ b/modules/remote_bitrate_estimator/BUILD.gn
@@ -104,6 +104,7 @@ "../../api:field_trials_view", "../../api:sequence_checker", "../../api/environment", + "../../api/transport:ecn_marking", "../../api/units:data_rate", "../../api/units:data_size", "../../api/units:time_delta", @@ -112,7 +113,6 @@ "../../rtc_base:logging", "../../rtc_base:rtc_numerics", "../../rtc_base/experiments:field_trial_parser", - "../../rtc_base/network:ecn_marking", "../rtp_rtcp:ntp_time_util", "../rtp_rtcp:rtp_rtcp_format", "//third_party/abseil-cpp/absl/algorithm:container", @@ -174,6 +174,7 @@ "../../api:rtp_headers", "../../api/environment:environment_factory", "../../api/transport:bandwidth_usage", + "../../api/transport:ecn_marking", "../../api/transport:mock_network_control", "../../api/transport:network_control", "../../api/units:data_rate", @@ -184,7 +185,6 @@ "../../rtc_base:checks", "../../rtc_base:logging", "../../rtc_base:random", - "../../rtc_base/network:ecn_marking", "../../system_wrappers", "../../test:create_test_field_trials", "../../test:fileutils",
diff --git a/modules/remote_bitrate_estimator/congestion_control_feedback_generator_unittest.cc b/modules/remote_bitrate_estimator/congestion_control_feedback_generator_unittest.cc index 1f91735..583da42 100644 --- a/modules/remote_bitrate_estimator/congestion_control_feedback_generator_unittest.cc +++ b/modules/remote_bitrate_estimator/congestion_control_feedback_generator_unittest.cc
@@ -17,6 +17,7 @@ #include <vector> #include "api/environment/environment_factory.h" +#include "api/transport/ecn_marking.h" #include "api/units/data_rate.h" #include "api/units/data_size.h" #include "api/units/time_delta.h" @@ -26,7 +27,6 @@ #include "modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback.h" #include "modules/rtp_rtcp/source/rtp_packet_received.h" #include "rtc_base/buffer.h" -#include "rtc_base/network/ecn_marking.h" #include "system_wrappers/include/clock.h" #include "test/gmock.h" #include "test/gtest.h"
diff --git a/modules/remote_bitrate_estimator/congestion_control_feedback_tracker.cc b/modules/remote_bitrate_estimator/congestion_control_feedback_tracker.cc index b871dd3..34fe72f 100644 --- a/modules/remote_bitrate_estimator/congestion_control_feedback_tracker.cc +++ b/modules/remote_bitrate_estimator/congestion_control_feedback_tracker.cc
@@ -16,13 +16,13 @@ #include <vector> #include "absl/algorithm/container.h" +#include "api/transport/ecn_marking.h" #include "api/units/time_delta.h" #include "api/units/timestamp.h" #include "modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback.h" #include "modules/rtp_rtcp/source/rtp_packet_received.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" -#include "rtc_base/network/ecn_marking.h" namespace webrtc {
diff --git a/modules/remote_bitrate_estimator/congestion_control_feedback_tracker.h b/modules/remote_bitrate_estimator/congestion_control_feedback_tracker.h index f2b2727..b964688 100644 --- a/modules/remote_bitrate_estimator/congestion_control_feedback_tracker.h +++ b/modules/remote_bitrate_estimator/congestion_control_feedback_tracker.h
@@ -14,10 +14,10 @@ #include <optional> #include <vector> +#include "api/transport/ecn_marking.h" #include "api/units/timestamp.h" #include "modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback.h" #include "modules/rtp_rtcp/source/rtp_packet_received.h" -#include "rtc_base/network/ecn_marking.h" #include "rtc_base/numerics/sequence_number_unwrapper.h" namespace webrtc {
diff --git a/modules/remote_bitrate_estimator/congestion_control_feedback_tracker_unittest.cc b/modules/remote_bitrate_estimator/congestion_control_feedback_tracker_unittest.cc index e70e207..794f08d 100644 --- a/modules/remote_bitrate_estimator/congestion_control_feedback_tracker_unittest.cc +++ b/modules/remote_bitrate_estimator/congestion_control_feedback_tracker_unittest.cc
@@ -13,11 +13,11 @@ #include <cstdint> #include <vector> +#include "api/transport/ecn_marking.h" #include "api/units/time_delta.h" #include "api/units/timestamp.h" #include "modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback.h" #include "modules/rtp_rtcp/source/rtp_packet_received.h" -#include "rtc_base/network/ecn_marking.h" #include "test/gmock.h" #include "test/gtest.h"
diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index 4dbbe3a..56b895f 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn
@@ -119,6 +119,7 @@ "../../api:rtp_parameters", "../../api:scoped_refptr", "../../api/audio_codecs:audio_codecs_api", + "../../api/transport:ecn_marking", "../../api/transport:network_control", "../../api/transport/rtp:corruption_detection_message", "../../api/transport/rtp:dependency_descriptor", @@ -139,7 +140,6 @@ "../../rtc_base:safe_compare", "../../rtc_base:safe_conversions", "../../rtc_base:stringutils", - "../../rtc_base/network:ecn_marking", "../../system_wrappers", "../video_coding:codec_globals_headers", "//third_party/abseil-cpp/absl/algorithm:container", @@ -710,6 +710,7 @@ "../../api/environment:environment_factory", "../../api/rtc_event_log", "../../api/task_queue", + "../../api/transport:ecn_marking", "../../api/transport:network_control", "../../api/transport/rtp:corruption_detection_message", "../../api/transport/rtp:dependency_descriptor", @@ -751,7 +752,6 @@ "../../rtc_base:task_queue_for_test", "../../rtc_base:threading", "../../rtc_base:timeutils", - "../../rtc_base/network:ecn_marking", "../../system_wrappers", "../../system_wrappers:metrics", "../../test:create_test_field_trials",
diff --git a/modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback.cc b/modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback.cc index ff37b00..b4e227c 100644 --- a/modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback.cc +++ b/modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback.cc
@@ -17,12 +17,12 @@ #include <vector> #include "api/array_view.h" +#include "api/transport/ecn_marking.h" #include "api/units/time_delta.h" #include "api/units/timestamp.h" #include "modules/rtp_rtcp/source/byte_io.h" #include "modules/rtp_rtcp/source/rtcp_packet/common_header.h" #include "rtc_base/checks.h" -#include "rtc_base/network/ecn_marking.h" namespace webrtc { namespace rtcp {
diff --git a/modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback.h b/modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback.h index 137c3d1..9f5f56c 100644 --- a/modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback.h +++ b/modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback.h
@@ -15,10 +15,10 @@ #include <vector> #include "api/array_view.h" +#include "api/transport/ecn_marking.h" #include "api/units/time_delta.h" #include "modules/rtp_rtcp/source/rtcp_packet/common_header.h" #include "modules/rtp_rtcp/source/rtcp_packet/rtpfb.h" -#include "rtc_base/network/ecn_marking.h" namespace webrtc { namespace rtcp {
diff --git a/modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback_unittest.cc b/modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback_unittest.cc index 55e4aae..dc074f1 100644 --- a/modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback_unittest.cc +++ b/modules/rtp_rtcp/source/rtcp_packet/congestion_control_feedback_unittest.cc
@@ -17,12 +17,12 @@ #include "api/array_view.h" #include "api/function_view.h" +#include "api/transport/ecn_marking.h" #include "api/units/time_delta.h" #include "modules/rtp_rtcp/source/rtcp_packet/common_header.h" #include "modules/rtp_rtcp/source/rtcp_packet/rtpfb.h" #include "rtc_base/buffer.h" #include "rtc_base/logging.h" -#include "rtc_base/network/ecn_marking.h" #include "test/gmock.h" #include "test/gtest.h"
diff --git a/modules/rtp_rtcp/source/rtp_packet_received.h b/modules/rtp_rtcp/source/rtp_packet_received.h index f4e2a98..77ed8c7 100644 --- a/modules/rtp_rtcp/source/rtp_packet_received.h +++ b/modules/rtp_rtcp/source/rtp_packet_received.h
@@ -17,9 +17,9 @@ #include "api/ref_counted_base.h" #include "api/rtp_headers.h" #include "api/scoped_refptr.h" +#include "api/transport/ecn_marking.h" #include "api/units/timestamp.h" #include "modules/rtp_rtcp/source/rtp_packet.h" -#include "rtc_base/network/ecn_marking.h" namespace webrtc { // Class to hold rtp packet with metadata for receiver side.
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index 606c116..b93ed8c 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn
@@ -556,6 +556,9 @@ ":webrtc_libvpx_interface", "../../test:test_support", ] + if (rtc_build_libvpx) { + deps += [ rtc_libvpx_dir ] + } } # This target includes the internal SW codec.
diff --git a/modules/video_coding/codecs/interface/libvpx_interface.cc b/modules/video_coding/codecs/interface/libvpx_interface.cc index 73c23e7..dea2ade 100644 --- a/modules/video_coding/codecs/interface/libvpx_interface.cc +++ b/modules/video_coding/codecs/interface/libvpx_interface.cc
@@ -14,11 +14,11 @@ #include <memory> #include "rtc_base/checks.h" -#include "vpx/vp8cx.h" -#include "vpx/vpx_codec.h" -#include "vpx/vpx_encoder.h" -#include "vpx/vpx_ext_ratectrl.h" -#include "vpx/vpx_image.h" +#include "third_party/libvpx/source/libvpx/vpx/vp8cx.h" +#include "third_party/libvpx/source/libvpx/vpx/vpx_codec.h" +#include "third_party/libvpx/source/libvpx/vpx/vpx_encoder.h" +#include "third_party/libvpx/source/libvpx/vpx/vpx_ext_ratectrl.h" +#include "third_party/libvpx/source/libvpx/vpx/vpx_image.h" namespace webrtc { namespace {
diff --git a/modules/video_coding/codecs/interface/libvpx_interface.h b/modules/video_coding/codecs/interface/libvpx_interface.h index 26ddca7..db7ccb07 100644 --- a/modules/video_coding/codecs/interface/libvpx_interface.h +++ b/modules/video_coding/codecs/interface/libvpx_interface.h
@@ -15,11 +15,11 @@ #include <memory> -#include "vpx/vp8cx.h" -#include "vpx/vpx_codec.h" -#include "vpx/vpx_encoder.h" -#include "vpx/vpx_ext_ratectrl.h" -#include "vpx/vpx_image.h" +#include "third_party/libvpx/source/libvpx/vpx/vp8cx.h" +#include "third_party/libvpx/source/libvpx/vpx/vpx_codec.h" +#include "third_party/libvpx/source/libvpx/vpx/vpx_encoder.h" +#include "third_party/libvpx/source/libvpx/vpx/vpx_ext_ratectrl.h" +#include "third_party/libvpx/source/libvpx/vpx/vpx_image.h" namespace webrtc {
diff --git a/modules/video_coding/codecs/interface/mock_libvpx_interface.h b/modules/video_coding/codecs/interface/mock_libvpx_interface.h index 0f92e42..b641ca7 100644 --- a/modules/video_coding/codecs/interface/mock_libvpx_interface.h +++ b/modules/video_coding/codecs/interface/mock_libvpx_interface.h
@@ -15,11 +15,11 @@ #include "modules/video_coding/codecs/interface/libvpx_interface.h" #include "test/gmock.h" -#include "vpx/vp8cx.h" -#include "vpx/vpx_codec.h" -#include "vpx/vpx_encoder.h" -#include "vpx/vpx_ext_ratectrl.h" -#include "vpx/vpx_image.h" +#include "third_party/libvpx/source/libvpx/vpx/vp8cx.h" +#include "third_party/libvpx/source/libvpx/vpx/vpx_codec.h" +#include "third_party/libvpx/source/libvpx/vpx/vpx_encoder.h" +#include "third_party/libvpx/source/libvpx/vpx/vpx_ext_ratectrl.h" +#include "third_party/libvpx/source/libvpx/vpx/vpx_image.h" namespace webrtc {
diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn index 88412cd..4324972 100644 --- a/p2p/BUILD.gn +++ b/p2p/BUILD.gn
@@ -309,7 +309,6 @@ "../rtc_base:stringutils", "../rtc_base:threading", "../rtc_base:timeutils", - "../rtc_base/network:ecn_marking", "../rtc_base/network:received_packet", "../rtc_base/network:sent_packet", "../rtc_base/system:no_unique_address", @@ -1291,7 +1290,6 @@ "../rtc_base:testclient", "../rtc_base:threading", "../rtc_base:timeutils", - "../rtc_base/network:ecn_marking", "../rtc_base/network:received_packet", "../rtc_base/network:sent_packet", "../rtc_base/third_party/sigslot",
diff --git a/pc/BUILD.gn b/pc/BUILD.gn index 4b98a02..1af9f2e 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn
@@ -574,6 +574,7 @@ "../api:field_trials_view", "../api/task_queue", "../api/task_queue:pending_task_safety_flag", + "../api/transport:ecn_marking", "../api/units:timestamp", "../call:rtp_receiver", "../call:video_receive_stream_api", @@ -588,7 +589,6 @@ "../rtc_base:network_route", "../rtc_base:socket", "../rtc_base/containers:flat_set", - "../rtc_base/network:ecn_marking", "../rtc_base/network:received_packet", "../rtc_base/network:sent_packet", ]
diff --git a/pc/rtp_transport.cc b/pc/rtp_transport.cc index b0cef00f..e2f5cdf 100644 --- a/pc/rtp_transport.cc +++ b/pc/rtp_transport.cc
@@ -20,6 +20,7 @@ #include "api/array_view.h" #include "api/task_queue/pending_task_safety_flag.h" #include "api/task_queue/task_queue_base.h" +#include "api/transport/ecn_marking.h" #include "api/units/timestamp.h" #include "call/rtp_demuxer.h" #include "media/base/rtp_utils.h" @@ -27,11 +28,11 @@ #include "modules/rtp_rtcp/source/rtp_packet_received.h" #include "p2p/base/packet_transport_internal.h" #include "pc/session_description.h" +#include "rtc_base/async_packet_socket.h" #include "rtc_base/checks.h" #include "rtc_base/containers/flat_set.h" #include "rtc_base/copy_on_write_buffer.h" #include "rtc_base/logging.h" -#include "rtc_base/network/ecn_marking.h" #include "rtc_base/network/received_packet.h" #include "rtc_base/network/sent_packet.h" #include "rtc_base/network_route.h"
diff --git a/pc/rtp_transport.h b/pc/rtp_transport.h index 4394b16..e6c7acf 100644 --- a/pc/rtp_transport.h +++ b/pc/rtp_transport.h
@@ -19,6 +19,7 @@ #include "api/field_trials_view.h" #include "api/task_queue/pending_task_safety_flag.h" +#include "api/transport/ecn_marking.h" #include "api/units/timestamp.h" #include "call/rtp_demuxer.h" #include "call/video_receive_stream.h" @@ -29,7 +30,6 @@ #include "rtc_base/async_packet_socket.h" #include "rtc_base/containers/flat_set.h" #include "rtc_base/copy_on_write_buffer.h" -#include "rtc_base/network/ecn_marking.h" #include "rtc_base/network/received_packet.h" #include "rtc_base/network/sent_packet.h" #include "rtc_base/network_route.h"
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn index 216b91f..7bb1856 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn
@@ -1007,7 +1007,6 @@ "../api/transport:ecn_marking", "../api/units:time_delta", "../api/units:timestamp", - "./network:ecn_marking", "synchronization:mutex", "system:no_unique_address", "system:rtc_export", @@ -1059,8 +1058,8 @@ ":ip_address", ":net_helpers", ":socket_address", + "../api/transport:ecn_marking", "../api/units:timestamp", - "./network:ecn_marking", "system:rtc_export", "third_party/sigslot", ] @@ -2007,7 +2006,6 @@ "../test:test_main", "../test:test_support", "../test:wait_until", - "network:ecn_marking", "system:file_wrapper", "third_party/sigslot", "//testing/gtest",
diff --git a/rtc_base/network/BUILD.gn b/rtc_base/network/BUILD.gn index 8d18cbc..b6627ac 100644 --- a/rtc_base/network/BUILD.gn +++ b/rtc_base/network/BUILD.gn
@@ -16,12 +16,6 @@ deps = [ "../system:rtc_export" ] } -rtc_source_set("ecn_marking") { - visibility = [ "*" ] - sources = [ "ecn_marking.h" ] - deps = [ "../../api/transport:ecn_marking" ] -} - rtc_library("received_packet") { visibility = [ "*" ] sources = [ @@ -29,7 +23,6 @@ "received_packet.h", ] deps = [ - ":ecn_marking", "..:checks", "..:socket_address", "../../api:array_view",
diff --git a/rtc_base/network/ecn_marking.h b/rtc_base/network/ecn_marking.h deleted file mode 100644 index 650ebef..0000000 --- a/rtc_base/network/ecn_marking.h +++ /dev/null
@@ -1,17 +0,0 @@ -/* - * Copyright 2024 The WebRTC Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ -#ifndef RTC_BASE_NETWORK_ECN_MARKING_H_ -#define RTC_BASE_NETWORK_ECN_MARKING_H_ - -// // TODO: bugs.webrtc.org/42225697 - delete this file. -#include "api/transport/ecn_marking.h" - - -#endif // RTC_BASE_NETWORK_ECN_MARKING_H_
diff --git a/rtc_base/physical_socket_server.cc b/rtc_base/physical_socket_server.cc index 0844b7f..fa03f59 100644 --- a/rtc_base/physical_socket_server.cc +++ b/rtc_base/physical_socket_server.cc
@@ -60,7 +60,6 @@ #include "rtc_base/event.h" #include "rtc_base/ip_address.h" #include "rtc_base/logging.h" -#include "rtc_base/network/ecn_marking.h" #include "rtc_base/network_monitor.h" #include "rtc_base/synchronization/mutex.h" #include "rtc_base/time_utils.h"
diff --git a/rtc_base/socket.h b/rtc_base/socket.h index b5476e5..160bd59 100644 --- a/rtc_base/socket.h +++ b/rtc_base/socket.h
@@ -25,12 +25,10 @@ #endif // IWYU pragma: end_exports +#include "api/transport/ecn_marking.h" #include "api/units/timestamp.h" #include "rtc_base/buffer.h" #include "rtc_base/checks.h" -#include "rtc_base/ip_address.h" -#include "rtc_base/net_helpers.h" -#include "rtc_base/network/ecn_marking.h" #include "rtc_base/socket_address.h" #include "rtc_base/system/rtc_export.h" #include "rtc_base/third_party/sigslot/sigslot.h"