From 5755ce818fbb7fa26c1edcbe4efe4b7fadfa413c Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 25 Aug 2025 12:50:39 +0200 Subject: [PATCH] video_capture/*: IWYU --- src/video_capture/null.c | 19 ++++++++------- src/video_capture/screen_linux.c | 13 ++++++---- src/video_capture/screen_osx.c | 41 ++++++++++++++++---------------- src/video_capture/v4l2.c | 15 ++++++++---- src/video_capture/ximea.c | 2 +- 5 files changed, 52 insertions(+), 38 deletions(-) diff --git a/src/video_capture/null.c b/src/video_capture/null.c index 78cc7155d..a9ef373aa 100644 --- a/src/video_capture/null.c +++ b/src/video_capture/null.c @@ -6,7 +6,7 @@ * hardware or do not wish to transmit. This fits the interface of the other * capture devices, but never produces any video. * - * Copyright (c) 2005-2023 CESNET + * Copyright (c) 2005-2025 CESNET * Copyright (c) 2004 University of Glasgow * Copyright (c) 2003 University of Southern California * @@ -49,13 +49,16 @@ * */ -#include "config.h" -#include "config_unix.h" -#include "config_win32.h" -#include "debug.h" -#include "lib_common.h" -#include "video.h" -#include "video_capture.h" +#include // for assert +#include // for NULL, free + +#include "lib_common.h" // for REGISTER_HIDDEN_MODULE, library_class +#include "video_capture.h" // for VIDCAP_INIT_AUDIO_NOT_SUPPORTED +#include "video_capture_params.h" // for vidcap_params_get_flags, VIDCAP_FL... + +struct audio_frame; +struct device_info; +struct vidcap_params; static int capture_state = 0; diff --git a/src/video_capture/screen_linux.c b/src/video_capture/screen_linux.c index 36a2b74cb..b306c1b93 100644 --- a/src/video_capture/screen_linux.c +++ b/src/video_capture/screen_linux.c @@ -5,7 +5,7 @@ * X11/PipeWire screen capture abstraction */ /* - * Copyright (c) 2023 CESNET + * Copyright (c) 2023-2025 CESNET * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,18 +36,23 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "config.h" -#include "config_unix.h" -#include "config_win32.h" +#include // for printf #include #include +#include "config.h" // for HAVE_* #include "debug.h" #include "lib_common.h" #include "utils/color_out.h" #include "utils/text.h" #include "video_capture.h" +#include "video_capture_params.h" // for vidcap_params_free_struct, vidcap_... + +struct audio_frame; +struct device_info; +struct vidcap_params; + static void vidcap_screen_linux_probe(struct device_info **cards, int *count, void (**deleter)(void *)) { diff --git a/src/video_capture/screen_osx.c b/src/video_capture/screen_osx.c index da44e9305..a6f50e545 100644 --- a/src/video_capture/screen_osx.c +++ b/src/video_capture/screen_osx.c @@ -3,7 +3,7 @@ * @author Martin Pulec */ /* - * Copyright (c) 2012-2023 CESNET, z.s.p.o. + * Copyright (c) 2012-2025 CESNET * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,30 +35,29 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#include "config_unix.h" -#include "config_win32.h" -#endif /* HAVE_CONFIG_H */ - -#include "debug.h" -#include "host.h" -#include "lib_common.h" -#include "utils/video_frame_pool.h" -#include "video.h" -#include "video_capture.h" - -#include "tv.h" - -#include "audio/types.h" - +#include +#include +#include +#include +#include #include #include #include +#include +#include -#include - -#include +#include "debug.h" +#include "lib_common.h" +#include "pixfmt_conv.h" +#include "tv.h" +#include "types.h" +#include "utils/video_frame_pool.h" +#include "video_capture.h" +#include "video_capture_params.h" +#include "video_codec.h" +#include "video_frame.h" +struct audio_frame; +struct vidcap_params; #define MAX_DISPLAY_COUNT 10 #define MOD_NAME "[screen cap mac] " diff --git a/src/video_capture/v4l2.c b/src/video_capture/v4l2.c index f5db365f2..89cc944d6 100644 --- a/src/video_capture/v4l2.c +++ b/src/video_capture/v4l2.c @@ -5,7 +5,7 @@ * @author Martin Pulec */ /* - * Copyright (c) 2012-2024 CESNET, z. s. p. o. + * Copyright (c) 2012-2025 CESNET * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include "config.h" // for HAVE_LIBV4LCONVERT #endif /* HAVE_CONFIG_H */ #ifdef HAVE_LIBV4LCONVERT @@ -55,11 +55,13 @@ #include #include #include +#include // for bool, false, true #include #include #include #include #include +#include // for gettimeofday, timeval #include enum { @@ -69,16 +71,21 @@ enum { #define MOD_NAME "[V4L cap.] " #include "debug.h" -#include "host.h" #include "lib_common.h" #include "tv.h" +#include "types.h" // for device_info, video_desc, tile, vid... #include "utils/color_out.h" #include "utils/list.h" #include "utils/macros.h" #include "utils/misc.h" // ug_strerror #include "v4l2_common.h" -#include "video.h" #include "video_capture.h" +#include "video_capture_params.h" // for vidcap_params_get_fmt, vidcap_para... +#include "video_codec.h" // for codec_is_planar, get_codec_name +#include "video_frame.h" // for get_interlacing_suffix, vf_alloc_desc + +struct audio_frame; +struct vidcap_params; /* prototypes of functions defined in this module */ static void print_fps(int fd, struct v4l2_frmivalenum *param); diff --git a/src/video_capture/ximea.c b/src/video_capture/ximea.c index 378bca076..063f80c61 100644 --- a/src/video_capture/ximea.c +++ b/src/video_capture/ximea.c @@ -36,7 +36,7 @@ */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include "config.h" // for XIMEA_RUNTIME_LINKING #endif // HAVE_CONFIG_H #include // for assert