Clean up includes in rtc_event_log_visualizer/

Bug: webrtc:11566
Change-Id: I9013298ad31861b356b377013bb3172d1a39a1e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325262
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41035}
diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn
index 21c8c7e..7765cf5 100644
--- a/rtc_tools/BUILD.gn
+++ b/rtc_tools/BUILD.gn
@@ -379,28 +379,38 @@
       ]
       deps = [
         ":chart_proto",
+        "../api:dtls_transport_interface",
         "../api:function_view",
+        "../api:make_ref_counted",
         "../api:network_state_predictor_api",
-        "../modules/audio_coding:neteq_input_audio_tools",
-        "../modules/audio_coding:neteq_tools_minimal",
-        "../rtc_base:ignore_wundef",
-        "../rtc_base:logging",
-        "../rtc_base:macromagic",
-        "../rtc_base:rate_statistics",
-        "../rtc_base:refcount",
-
-        # TODO(kwiberg): Remove this dependency.
-        "../api/audio_codecs:audio_codecs_api",
+        "../api:rtp_headers",
+        "../api:rtp_parameters",
+        "../api:scoped_refptr",
+        "../api/audio_codecs:audio_codecs_api",  # TODO(kwiberg): Remove this
+                                                 # dependency.
+        "../api/neteq:neteq_api",
+        "../api/rtc_event_log:rtc_event_log",
         "../api/transport:field_trial_based_config",
         "../api/transport:goog_cc",
         "../api/transport:network_control",
+        "../api/units:data_rate",
+        "../api/units:time_delta",
+        "../api/units:timestamp",
         "../call:call_interfaces",
         "../call:video_stream_api",
+        "../logging:ice_log",
+        "../logging:rtc_event_audio",
+        "../logging:rtc_event_audio",
+        "../logging:rtc_event_bwe",
+        "../logging:rtc_event_generic_packet_events",
         "../logging:rtc_event_log_parser",
+        "../logging:rtc_event_rtp_rtcp",
         "../logging:rtc_stream_config",
         "../modules/audio_coding:ana_debug_dump_proto",
         "../modules/audio_coding:audio_network_adaptor",
+        "../modules/audio_coding:neteq_input_audio_tools",
         "../modules/audio_coding:neteq_tools",
+        "../modules/audio_coding:neteq_tools_minimal",
         "../modules/congestion_controller",
         "../modules/congestion_controller/goog_cc:delay_based_bwe",
         "../modules/congestion_controller/goog_cc:estimators",
@@ -410,8 +420,14 @@
         "../modules/rtp_rtcp",
         "../modules/rtp_rtcp:rtp_rtcp_format",
         "../rtc_base:checks",
+        "../rtc_base:ignore_wundef",
+        "../rtc_base:logging",
+        "../rtc_base:macromagic",
+        "../rtc_base:rate_statistics",
+        "../rtc_base:refcount",
         "../rtc_base:rtc_numerics",
         "../rtc_base:stringutils",
+        "../rtc_base/network:sent_packet",
         "../system_wrappers",
         "../test:explicit_key_value_config",
       ]
diff --git a/rtc_tools/rtc_event_log_visualizer/alerts.cc b/rtc_tools/rtc_event_log_visualizer/alerts.cc
index a9f50cd..98ffbd3 100644
--- a/rtc_tools/rtc_event_log_visualizer/alerts.cc
+++ b/rtc_tools/rtc_event_log_visualizer/alerts.cc
@@ -13,15 +13,18 @@
 #include <stdio.h>
 
 #include <algorithm>
-#include <limits>
+#include <cstdint>
+#include <cstdlib>
+#include <functional>
 #include <map>
 #include <string>
 
-#include "logging/rtc_event_log/rtc_event_processor.h"
-#include "rtc_base/checks.h"
-#include "rtc_base/logging.h"
+#include "absl/types/optional.h"
+#include "api/units/timestamp.h"
+#include "logging/rtc_event_log/events/logged_rtp_rtcp.h"
+#include "logging/rtc_event_log/rtc_event_log_parser.h"
 #include "rtc_base/numerics/sequence_number_unwrapper.h"
-#include "rtc_base/strings/string_builder.h"
+#include "rtc_tools/rtc_event_log_visualizer/analyzer_common.h"
 
 namespace webrtc {
 
diff --git a/rtc_tools/rtc_event_log_visualizer/alerts.h b/rtc_tools/rtc_event_log_visualizer/alerts.h
index 72f1241..d421ceb 100644
--- a/rtc_tools/rtc_event_log_visualizer/alerts.h
+++ b/rtc_tools/rtc_event_log_visualizer/alerts.h
@@ -13,6 +13,7 @@
 
 #include <stdio.h>
 
+#include <functional>
 #include <map>
 #include <string>
 #include <utility>
diff --git a/rtc_tools/rtc_event_log_visualizer/analyze_audio.cc b/rtc_tools/rtc_event_log_visualizer/analyze_audio.cc
index 29dc26c..af6e2ee 100644
--- a/rtc_tools/rtc_event_log_visualizer/analyze_audio.cc
+++ b/rtc_tools/rtc_event_log_visualizer/analyze_audio.cc
@@ -10,18 +10,39 @@
 
 #include "rtc_tools/rtc_event_log_visualizer/analyze_audio.h"
 
+#include <cstdint>
+#include <map>
 #include <memory>
 #include <set>
+#include <string>
 #include <utility>
 #include <vector>
 
+#include "absl/strings/string_view.h"
+#include "absl/types/optional.h"
+#include "api/audio_codecs/audio_codec_pair_id.h"
+#include "api/audio_codecs/audio_decoder.h"
+#include "api/audio_codecs/audio_decoder_factory.h"
+#include "api/audio_codecs/audio_format.h"
+#include "api/function_view.h"
+#include "api/make_ref_counted.h"
+#include "api/neteq/neteq.h"
+#include "api/scoped_refptr.h"
+#include "api/units/timestamp.h"
+#include "logging/rtc_event_log/events/rtc_event_audio_network_adaptation.h"
+#include "logging/rtc_event_log/rtc_event_log_parser.h"
 #include "modules/audio_coding/neteq/tools/audio_sink.h"
 #include "modules/audio_coding/neteq/tools/fake_decode_from_file.h"
 #include "modules/audio_coding/neteq/tools/neteq_delay_analyzer.h"
 #include "modules/audio_coding/neteq/tools/neteq_event_log_input.h"
+#include "modules/audio_coding/neteq/tools/neteq_input.h"
 #include "modules/audio_coding/neteq/tools/neteq_replacement_input.h"
+#include "modules/audio_coding/neteq/tools/neteq_stats_getter.h"
 #include "modules/audio_coding/neteq/tools/neteq_test.h"
 #include "modules/audio_coding/neteq/tools/resample_input_audio_file.h"
+#include "rtc_base/checks.h"
+#include "rtc_tools/rtc_event_log_visualizer/analyzer_common.h"
+#include "rtc_tools/rtc_event_log_visualizer/plot_base.h"
 
 namespace webrtc {
 
diff --git a/rtc_tools/rtc_event_log_visualizer/analyze_audio.h b/rtc_tools/rtc_event_log_visualizer/analyze_audio.h
index 726e844..586d6ce 100644
--- a/rtc_tools/rtc_event_log_visualizer/analyze_audio.h
+++ b/rtc_tools/rtc_event_log_visualizer/analyze_audio.h
@@ -17,6 +17,7 @@
 #include <string>
 
 #include "api/function_view.h"
+#include "api/neteq/neteq.h"
 #include "logging/rtc_event_log/rtc_event_log_parser.h"
 #include "modules/audio_coding/neteq/tools/neteq_stats_getter.h"
 #include "rtc_tools/rtc_event_log_visualizer/analyzer_common.h"
diff --git a/rtc_tools/rtc_event_log_visualizer/analyzer.cc b/rtc_tools/rtc_event_log_visualizer/analyzer.cc
index 01adfc5..1d8d5f1 100644
--- a/rtc_tools/rtc_event_log_visualizer/analyzer.cc
+++ b/rtc_tools/rtc_event_log_visualizer/analyzer.cc
@@ -12,49 +12,64 @@
 
 #include <algorithm>
 #include <cmath>
+#include <cstddef>
+#include <cstdint>
 #include <deque>
 #include <limits>
 #include <map>
 #include <memory>
 #include <string>
+#include <tuple>
 #include <utility>
+#include <vector>
 
 #include "absl/algorithm/container.h"
 #include "absl/functional/bind_front.h"
 #include "absl/strings/string_view.h"
+#include "absl/types/optional.h"
+#include "api/dtls_transport_interface.h"
 #include "api/function_view.h"
+#include "api/media_types.h"
 #include "api/network_state_predictor.h"
-#include "api/transport/field_trial_based_config.h"
+#include "api/rtc_event_log/rtc_event_log.h"
+#include "api/rtp_headers.h"
 #include "api/transport/goog_cc_factory.h"
-#include "call/audio_receive_stream.h"
-#include "call/audio_send_stream.h"
-#include "call/call.h"
-#include "call/video_receive_stream.h"
-#include "call/video_send_stream.h"
+#include "api/transport/network_control.h"
+#include "api/transport/network_types.h"
+#include "api/units/data_rate.h"
+#include "api/units/time_delta.h"
+#include "api/units/timestamp.h"
+#include "logging/rtc_event_log/events/logged_rtp_rtcp.h"
+#include "logging/rtc_event_log/events/rtc_event_generic_packet_received.h"
+#include "logging/rtc_event_log/events/rtc_event_generic_packet_sent.h"
+#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h"
+#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h"
+#include "logging/rtc_event_log/rtc_event_log_parser.h"
 #include "logging/rtc_event_log/rtc_event_processor.h"
-#include "logging/rtc_event_log/rtc_stream_config.h"
-#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h"
-#include "modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.h"
-#include "modules/congestion_controller/goog_cc/bitrate_estimator.h"
-#include "modules/congestion_controller/goog_cc/delay_based_bwe.h"
+#include "modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_interface.h"
 #include "modules/congestion_controller/include/receive_side_congestion_controller.h"
 #include "modules/congestion_controller/rtp/transport_feedback_adapter.h"
+#include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
+#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
-#include "modules/rtp_rtcp/source/rtcp_packet.h"
-#include "modules/rtp_rtcp/source/rtcp_packet/common_header.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/receiver_report.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/remb.h"
+#include "modules/rtp_rtcp/source/rtcp_packet/report_block.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/sender_report.h"
+#include "modules/rtp_rtcp/source/rtcp_packet/target_bitrate.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
 #include "modules/rtp_rtcp/source/rtp_header_extensions.h"
 #include "modules/rtp_rtcp/source/rtp_packet_received.h"
-#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/logging.h"
+#include "rtc_base/network/sent_packet.h"
 #include "rtc_base/numerics/sequence_number_unwrapper.h"
 #include "rtc_base/rate_statistics.h"
 #include "rtc_base/strings/string_builder.h"
+#include "rtc_tools/rtc_event_log_visualizer/analyzer_common.h"
 #include "rtc_tools/rtc_event_log_visualizer/log_simulation.h"
+#include "rtc_tools/rtc_event_log_visualizer/plot_base.h"
+#include "system_wrappers/include/clock.h"
 #include "test/explicit_key_value_config.h"
 
 namespace webrtc {
diff --git a/rtc_tools/rtc_event_log_visualizer/analyzer.h b/rtc_tools/rtc_event_log_visualizer/analyzer.h
index f63e9a6..3dfd5de 100644
--- a/rtc_tools/rtc_event_log_visualizer/analyzer.h
+++ b/rtc_tools/rtc_event_log_visualizer/analyzer.h
@@ -11,16 +11,15 @@
 #ifndef RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_ANALYZER_H_
 #define RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_ANALYZER_H_
 
+#include <cstdint>
+#include <cstdio>
 #include <map>
-#include <memory>
-#include <set>
 #include <string>
-#include <utility>
 #include <vector>
 
+#include "api/function_view.h"
 #include "logging/rtc_event_log/rtc_event_log_parser.h"
-#include "modules/audio_coding/neteq/tools/neteq_stats_getter.h"
-#include "rtc_base/strings/string_builder.h"
+#include "modules/rtp_rtcp/source/rtcp_packet/report_block.h"
 #include "rtc_tools/rtc_event_log_visualizer/analyzer_common.h"
 #include "rtc_tools/rtc_event_log_visualizer/plot_base.h"
 
diff --git a/rtc_tools/rtc_event_log_visualizer/analyzer_common.cc b/rtc_tools/rtc_event_log_visualizer/analyzer_common.cc
index 3d3ce5a..be635fb 100644
--- a/rtc_tools/rtc_event_log_visualizer/analyzer_common.cc
+++ b/rtc_tools/rtc_event_log_visualizer/analyzer_common.cc
@@ -11,6 +11,12 @@
 
 #include "rtc_tools/rtc_event_log_visualizer/analyzer_common.h"
 
+#include <cstdint>
+#include <string>
+
+#include "logging/rtc_event_log/rtc_event_log_parser.h"
+#include "rtc_base/strings/string_builder.h"
+
 namespace webrtc {
 
 bool IsRtxSsrc(const ParsedRtcEventLog& parsed_log,
diff --git a/rtc_tools/rtc_event_log_visualizer/analyzer_common.h b/rtc_tools/rtc_event_log_visualizer/analyzer_common.h
index b0b556a..5f778cb 100644
--- a/rtc_tools/rtc_event_log_visualizer/analyzer_common.h
+++ b/rtc_tools/rtc_event_log_visualizer/analyzer_common.h
@@ -11,11 +11,14 @@
 #ifndef RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_ANALYZER_COMMON_H_
 #define RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_ANALYZER_COMMON_H_
 
+#include <cstddef>
 #include <cstdint>
 #include <string>
 
 #include "absl/types/optional.h"
 #include "api/function_view.h"
+#include "api/units/time_delta.h"
+#include "api/units/timestamp.h"
 #include "logging/rtc_event_log/rtc_event_log_parser.h"
 #include "rtc_tools/rtc_event_log_visualizer/plot_base.h"
 
diff --git a/rtc_tools/rtc_event_log_visualizer/log_simulation.cc b/rtc_tools/rtc_event_log_visualizer/log_simulation.cc
index 2ef40e6..a32c800 100644
--- a/rtc_tools/rtc_event_log_visualizer/log_simulation.cc
+++ b/rtc_tools/rtc_event_log_visualizer/log_simulation.cc
@@ -10,10 +10,24 @@
 #include "rtc_tools/rtc_event_log_visualizer/log_simulation.h"
 
 #include <algorithm>
+#include <cstdint>
+#include <functional>
+#include <memory>
 #include <utility>
 
+#include "api/transport/network_control.h"
+#include "api/transport/network_types.h"
+#include "api/units/data_rate.h"
+#include "api/units/time_delta.h"
+#include "api/units/timestamp.h"
+#include "logging/rtc_event_log/events/logged_rtp_rtcp.h"
+#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h"
+#include "logging/rtc_event_log/events/rtc_event_probe_cluster_created.h"
+#include "logging/rtc_event_log/rtc_event_log_parser.h"
 #include "logging/rtc_event_log/rtc_event_processor.h"
+#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "modules/rtp_rtcp/source/time_util.h"
+#include "rtc_base/network/sent_packet.h"
 #include "system_wrappers/include/clock.h"
 
 namespace webrtc {
diff --git a/rtc_tools/rtc_event_log_visualizer/log_simulation.h b/rtc_tools/rtc_event_log_visualizer/log_simulation.h
index 15ed253..dbb0a1c 100644
--- a/rtc_tools/rtc_event_log_visualizer/log_simulation.h
+++ b/rtc_tools/rtc_event_log_visualizer/log_simulation.h
@@ -10,15 +10,23 @@
 #ifndef RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_LOG_SIMULATION_H_
 #define RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_LOG_SIMULATION_H_
 
+#include <cstddef>
+#include <cstdint>
 #include <deque>
 #include <functional>
 #include <map>
 #include <memory>
-#include <vector>
 
+#include "api/rtc_event_log/rtc_event_log.h"
 #include "api/transport/network_control.h"
+#include "api/transport/network_types.h"
+#include "api/units/timestamp.h"
+#include "logging/rtc_event_log/events/logged_rtp_rtcp.h"
+#include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair_config.h"
+#include "logging/rtc_event_log/events/rtc_event_probe_cluster_created.h"
 #include "logging/rtc_event_log/rtc_event_log_parser.h"
 #include "modules/congestion_controller/rtp/transport_feedback_adapter.h"
+#include "modules/rtp_rtcp/source/rtcp_packet/report_block.h"
 
 namespace webrtc {
 
diff --git a/rtc_tools/rtc_event_log_visualizer/plot_base.cc b/rtc_tools/rtc_event_log_visualizer/plot_base.cc
index 779fe5d..597a22c 100644
--- a/rtc_tools/rtc_event_log_visualizer/plot_base.cc
+++ b/rtc_tools/rtc_event_log_visualizer/plot_base.cc
@@ -11,8 +11,14 @@
 #include "rtc_tools/rtc_event_log_visualizer/plot_base.h"
 
 #include <algorithm>
+#include <cstddef>
+#include <cstdio>
 #include <memory>
+#include <string>
+#include <utility>
+#include <vector>
 
+#include "absl/strings/string_view.h"
 #include "rtc_base/checks.h"
 
 namespace webrtc {
diff --git a/rtc_tools/rtc_event_log_visualizer/plot_base.h b/rtc_tools/rtc_event_log_visualizer/plot_base.h
index 7882ba8..e970a6e 100644
--- a/rtc_tools/rtc_event_log_visualizer/plot_base.h
+++ b/rtc_tools/rtc_event_log_visualizer/plot_base.h
@@ -10,6 +10,7 @@
 #ifndef RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_PLOT_BASE_H_
 #define RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_PLOT_BASE_H_
 
+#include <cstdint>
 #include <memory>
 #include <string>
 #include <utility>