Make header files self contained.

This CL adds #includes to header files in order to make them
self contained after the preprocessor pass.

Bug: b/251890128
Change-Id: I81c3ba38fb8ab8a2bbd151ba99aa871fae9f1b1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278422
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38327}
This commit is contained in:
Mirko Bonadei 2022-10-07 21:47:49 +00:00 committed by WebRTC LUCI CQ
parent 61ad0044df
commit 9d9c2d5795
45 changed files with 85 additions and 7 deletions

View File

@ -158,6 +158,7 @@ rtc_library("candidate") {
rtc_source_set("turn_customizer") {
visibility = [ "*" ]
sources = [ "turn_customizer.h" ]
deps = [ "transport:stun_types" ]
}
rtc_source_set("ice_transport_interface") {

View File

@ -307,6 +307,10 @@ specific_include_rules = {
"+rtc_base/containers/flat_map.h",
],
"video_track_source_proxy_factory.h": [
"+rtc_base/thread.h",
],
# .cc files in api/ should not be restricted in what they can #include,
# so we re-add all the top-level directories here. (That's because .h
# files leak their #includes to whoever's #including them, but .cc files

View File

@ -15,6 +15,7 @@ if (is_android) {
rtc_source_set("audio_encoder_g722_config") {
visibility = [ "*" ]
sources = [ "audio_encoder_g722_config.h" ]
deps = [ "..:audio_codecs_api" ]
}
rtc_library("audio_encoder_g722") {

View File

@ -11,6 +11,8 @@
#ifndef API_AUDIO_CODECS_G722_AUDIO_ENCODER_G722_CONFIG_H_
#define API_AUDIO_CODECS_G722_AUDIO_ENCODER_G722_CONFIG_H_
#include "api/audio_codecs/audio_encoder.h"
namespace webrtc {
struct AudioEncoderG722Config {

View File

@ -20,9 +20,7 @@ rtc_library("audio_encoder_opus_config") {
"audio_encoder_opus_config.cc",
"audio_encoder_opus_config.h",
]
deps = [
"../../../rtc_base/system:rtc_export",
]
deps = [ "../../../rtc_base/system:rtc_export" ]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
defines = []
if (rtc_opus_variable_complexity) {
@ -35,6 +33,7 @@ rtc_library("audio_encoder_opus_config") {
rtc_source_set("audio_decoder_opus_config") {
visibility = [ "*" ]
sources = [ "audio_decoder_multi_channel_opus_config.h" ]
deps = [ "..:audio_codecs_api" ]
}
rtc_library("audio_encoder_opus") {

View File

@ -13,6 +13,8 @@
#include <vector>
#include "api/audio_codecs/audio_decoder.h"
namespace webrtc {
struct AudioDecoderMultiChannelOpusConfig {
// The number of channels that the decoder will output.

View File

@ -11,6 +11,7 @@
#ifndef API_CALL_AUDIO_SINK_H_
#define API_CALL_AUDIO_SINK_H_
#include <stddef.h>
#include <stdint.h>
namespace webrtc {

View File

@ -15,6 +15,7 @@
#include <vector>
#include "api/video_codecs/sdp_video_format.h"
#include "api/video_codecs/video_decoder.h"
#include "api/video_codecs/video_decoder_factory.h"
#include "test/gmock.h"

View File

@ -15,6 +15,7 @@
#include <vector>
#include "api/video_codecs/sdp_video_format.h"
#include "api/video_codecs/video_encoder.h"
#include "api/video_codecs/video_encoder_factory.h"
#include "test/gmock.h"

View File

@ -17,6 +17,7 @@
#include <vector>
#include "api/video_codecs/sdp_video_format.h"
#include "api/video_codecs/video_decoder.h"
#include "api/video_codecs/video_decoder_factory.h"
#include "rtc_base/checks.h"

View File

@ -17,6 +17,7 @@
#include <vector>
#include "api/video_codecs/sdp_video_format.h"
#include "api/video_codecs/video_encoder.h"
#include "api/video_codecs/video_encoder_factory.h"
#include "rtc_base/checks.h"

View File

@ -13,9 +13,10 @@
#include <stdlib.h>
#include "api/transport/stun.h"
namespace cricket {
class PortInterface;
class StunMessage;
} // namespace cricket
namespace webrtc {

View File

@ -100,6 +100,7 @@ rtc_source_set("bitstream_parser_api") {
visibility = [ "*" ]
sources = [ "bitstream_parser.h" ]
deps = [ "..:array_view" ]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_library("builtin_video_decoder_factory") {
@ -164,6 +165,7 @@ rtc_source_set("video_encoder_factory_template_libvpx_vp8_adapter") {
public = [ "video_encoder_factory_template_libvpx_vp8_adapter.h" ]
deps = [
":video_codecs_api",
"../../modules/video_coding:webrtc_vp8",
"../../modules/video_coding:webrtc_vp8_scalability",
]
@ -194,6 +196,7 @@ rtc_source_set("video_encoder_factory_template_libaom_av1_adapter") {
deps = [
":scalability_mode",
":video_codecs_api",
"../../modules/video_coding/codecs/av1:av1_svc_config",
"../../modules/video_coding/codecs/av1:libaom_av1_encoder",
"../../modules/video_coding/svc:scalability_mode_util",
@ -219,7 +222,10 @@ rtc_source_set("video_decoder_factory_template_libvpx_vp8_adapter") {
allow_poison = [ "software_video_codecs" ]
public = [ "video_decoder_factory_template_libvpx_vp8_adapter.h" ]
deps = [ "../../modules/video_coding:webrtc_vp8" ]
deps = [
":video_codecs_api",
"../../modules/video_coding:webrtc_vp8",
]
}
rtc_source_set("video_decoder_factory_template_libvpx_vp9_adapter") {
@ -243,7 +249,10 @@ rtc_source_set("video_decoder_factory_template_dav1d_adapter") {
allow_poison = [ "software_video_codecs" ]
public = [ "video_decoder_factory_template_dav1d_adapter.h" ]
deps = [ "../../modules/video_coding/codecs/av1:dav1d_decoder" ]
deps = [
":video_codecs_api",
"../../modules/video_coding/codecs/av1:dav1d_decoder",
]
}
rtc_library("vp8_temporal_layers_factory") {

View File

@ -10,9 +10,11 @@
#ifndef API_VIDEO_CODECS_BITSTREAM_PARSER_H_
#define API_VIDEO_CODECS_BITSTREAM_PARSER_H_
#include <stddef.h>
#include <stdint.h>
#include "absl/types/optional.h"
#include "api/array_view.h"
namespace webrtc {

View File

@ -14,6 +14,7 @@
#include <memory>
#include <vector>
#include "api/video_codecs/sdp_video_format.h"
#include "modules/video_coding/codecs/av1/dav1d_decoder.h"
namespace webrtc {

View File

@ -14,6 +14,7 @@
#include <memory>
#include <vector>
#include "api/video_codecs/sdp_video_format.h"
#include "modules/video_coding/codecs/vp8/include/vp8.h"
namespace webrtc {

View File

@ -15,6 +15,7 @@
#include <vector>
#include "absl/container/inlined_vector.h"
#include "api/video_codecs/sdp_video_format.h"
#include "modules/video_coding/codecs/av1/av1_svc_config.h"
#include "modules/video_coding/codecs/av1/libaom_av1_encoder.h"

View File

@ -15,6 +15,7 @@
#include <vector>
#include "absl/container/inlined_vector.h"
#include "api/video_codecs/sdp_video_format.h"
#include "modules/video_coding/codecs/vp8/include/vp8.h"
#include "modules/video_coding/codecs/vp8/vp8_scalability.h"

View File

@ -12,6 +12,7 @@
#define API_VIDEO_TRACK_SOURCE_PROXY_FACTORY_H_
#include "api/media_stream_interface.h"
#include "rtc_base/thread.h"
namespace webrtc {

View File

@ -11,6 +11,9 @@
#ifndef AUDIO_CONVERSION_H_
#define AUDIO_CONVERSION_H_
#include <stddef.h>
#include <stdint.h>
namespace webrtc {
// Convert fixed point number with 8 bit fractional part, to floating point.

View File

@ -14,6 +14,8 @@
#ifndef COMMON_AUDIO_SIGNAL_PROCESSING_INCLUDE_SPL_INL_H_
#define COMMON_AUDIO_SIGNAL_PROCESSING_INCLUDE_SPL_INL_H_
#include <stdint.h>
#include "rtc_base/compile_assert_c.h"
extern const int8_t kWebRtcSpl_CountLeadingZeros32_Table[64];

View File

@ -15,6 +15,8 @@
#ifndef COMMON_AUDIO_SIGNAL_PROCESSING_INCLUDE_SPL_INL_ARMV7_H_
#define COMMON_AUDIO_SIGNAL_PROCESSING_INCLUDE_SPL_INL_ARMV7_H_
#include <stdint.h>
/* TODO(kma): Replace some assembly code with GCC intrinsics
* (e.g. __builtin_clz).
*/

View File

@ -11,6 +11,8 @@
#ifndef COMMON_VIDEO_FRAME_COUNTS_H_
#define COMMON_VIDEO_FRAME_COUNTS_H_
#include <cstdint>
namespace webrtc {
struct FrameCounts {

View File

@ -11,6 +11,7 @@
#ifndef MODULES_AUDIO_CODING_CODECS_G711_G711_INTERFACE_H_
#define MODULES_AUDIO_CODING_CODECS_G711_G711_INTERFACE_H_
#include <stddef.h>
#include <stdint.h>
// Comfort noise constants

View File

@ -11,6 +11,7 @@
#ifndef MODULES_AUDIO_CODING_CODECS_G722_G722_INTERFACE_H_
#define MODULES_AUDIO_CODING_CODECS_G722_G722_INTERFACE_H_
#include <stddef.h>
#include <stdint.h>
/*

View File

@ -11,6 +11,7 @@
#ifndef MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_DECODER_ISAC_T_IMPL_H_
#define MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_DECODER_ISAC_T_IMPL_H_
#include "modules/audio_coding/codecs/isac/audio_decoder_isac_t.h"
#include "rtc_base/checks.h"
namespace webrtc {

View File

@ -11,6 +11,7 @@
#ifndef MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_
#define MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_
#include "modules/audio_coding/codecs/isac/audio_encoder_isac_t.h"
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_minmax.h"

View File

@ -20,6 +20,8 @@
#include <stdint.h>
#include "modules/audio_coding/codecs/isac/fix/source/settings.h"
/* indices of KLT coefficients used */
extern const uint16_t WebRtcIsacfix_kSelIndGain[12];

View File

@ -11,6 +11,8 @@
#ifndef MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_FILTER_FUNCTIONS_H_
#define MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_FILTER_FUNCTIONS_H_
#include <stddef.h>
#include "modules/audio_coding/codecs/isac/main/source/structs.h"
void WebRtcIsac_AutoCorr(double* r, const double* x, size_t N, size_t order);

View File

@ -11,6 +11,8 @@
#ifndef MODULES_AUDIO_PROCESSING_AEC3_DELAY_ESTIMATE_H_
#define MODULES_AUDIO_PROCESSING_AEC3_DELAY_ESTIMATE_H_
#include <stddef.h>
namespace webrtc {
// Stores delay_estimates.

View File

@ -11,6 +11,9 @@
#ifndef MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_
#define MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_
#include <stddef.h>
#include <stdint.h>
namespace webrtc {
enum {

View File

@ -11,6 +11,8 @@
#ifndef MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROC_INTERNAL_H_
#define MODULES_AUDIO_PROCESSING_VAD_VAD_AUDIO_PROC_INTERNAL_H_
#include <stddef.h>
namespace webrtc {
// These values should match MATLAB counterparts for unit-tests to pass.

View File

@ -30,6 +30,7 @@
#ifndef MODULES_THIRD_PARTY_G722_G722_H_
#define MODULES_THIRD_PARTY_G722_G722_H_
#include <stddef.h>
#include <stdint.h>
/*! \page g722_page G.722 encoding and decoding

View File

@ -16,6 +16,8 @@
#ifndef MODULES_VIDEO_CODING_UTILITY_IVF_DEFINES_H_
#define MODULES_VIDEO_CODING_UTILITY_IVF_DEFINES_H_
#include <stddef.h>
namespace webrtc {
constexpr size_t kIvfHeaderSize = 32;
} // namespace webrtc

View File

@ -2631,6 +2631,7 @@ if (rtc_include_tests && !build_with_chromium) {
":stream_collection",
":video_track_source",
"../api:audio_options_api",
"../api:call_api",
"../api:create_frame_generator",
"../api:create_peerconnection_factory",
"../api:field_trials_view",

View File

@ -14,6 +14,7 @@
#include <string>
#include <vector>
#include "api/call/audio_sink.h"
#include "media/base/media_channel.h"
#include "rtc_base/gunit.h"
#include "test/gmock.h"

View File

@ -11,6 +11,9 @@
#ifndef PC_TEST_RTC_STATS_OBTAINER_H_
#define PC_TEST_RTC_STATS_OBTAINER_H_
#include "api/make_ref_counted.h"
#include "api/sequence_checker.h"
#include "api/stats/rtc_stats_collector_callback.h"
#include "api/stats/rtc_stats_report.h"
#include "rtc_base/gunit.h"

View File

@ -11,6 +11,8 @@
#ifndef RTC_BASE_SSL_ROOTS_H_
#define RTC_BASE_SSL_ROOTS_H_
#include <cstddef>
// This file is the root certificates in C form that are needed to connect to
// Google.

View File

@ -11,6 +11,8 @@
#ifndef RTC_BASE_SYSTEM_TIME_H_
#define RTC_BASE_SYSTEM_TIME_H_
#include <cstdint>
namespace rtc {
// Returns the actual system time, even if a clock is set for testing.

View File

@ -14,6 +14,8 @@
#ifndef SDK_ANDROID_NATIVE_API_JNI_JNI_INT_WRAPPER_H_
#define SDK_ANDROID_NATIVE_API_JNI_JNI_INT_WRAPPER_H_
#include <cstdint>
// Wrapper used to receive int when calling Java from native. The wrapper
// disallows automatic conversion of anything besides int32_t to a jint.
// Checking is only done in debugging builds.

View File

@ -11,6 +11,9 @@
#ifndef SDK_OBJC_NATIVE_SRC_AUDIO_HELPERS_H_
#define SDK_OBJC_NATIVE_SRC_AUDIO_HELPERS_H_
#import <Foundation/Foundation.h>
#include <objc/objc.h>
#include <string>
namespace webrtc {

View File

@ -15,6 +15,7 @@
#include <vector>
#include "api/audio_codecs/audio_encoder_factory.h"
#include "api/make_ref_counted.h"
#include "api/scoped_refptr.h"
#include "test/gmock.h"

View File

@ -11,5 +11,8 @@ import("../../../webrtc.gni")
rtc_source_set("fake_sctp_transport") {
visibility = [ "*" ]
sources = [ "fake_sctp_transport.h" ]
deps = [ "../../../media:rtc_data_sctp_transport_internal" ]
deps = [
"../../../api/transport:sctp_transport_factory_interface",
"../../../media:rtc_data_sctp_transport_internal",
]
}

View File

@ -13,6 +13,7 @@
#include <memory>
#include "api/transport/sctp_transport_factory_interface.h"
#include "media/sctp/sctp_transport_internal.h"
// Used for tests in this file to verify that PeerConnection responds to signals

View File

@ -11,6 +11,7 @@
#ifndef TEST_TESTSUPPORT_MOCK_MOCK_FRAME_READER_H_
#define TEST_TESTSUPPORT_MOCK_MOCK_FRAME_READER_H_
#include "api/video/i420_buffer.h"
#include "test/gmock.h"
#include "test/testsupport/frame_reader.h"