[FFmpeg-cvslog] avdevice/v4l2*: Improve included headers

Andreas Rheinhardt git at videolan.org
Tue May 10 09:35:20 EEST 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri May  6 20:11:00 2022 +0200| [8550a05ece37cbb777deb221cce43b5f3345137b] | committer: Andreas Rheinhardt

avdevice/v4l2*: Improve included headers

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8550a05ece37cbb777deb221cce43b5f3345137b
---

 libavdevice/v4l2-common.h | 13 +++----------
 libavdevice/v4l2.c        |  8 ++++++++
 libavdevice/v4l2enc.c     |  4 +++-
 3 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/libavdevice/v4l2-common.h b/libavdevice/v4l2-common.h
index c7bed3e3b4..4fbd15d28c 100644
--- a/libavdevice/v4l2-common.h
+++ b/libavdevice/v4l2-common.h
@@ -21,7 +21,7 @@
 
 #undef __STRICT_ANSI__ //workaround due to broken kernel headers
 #include "config.h"
-#include "libavformat/internal.h"
+#include <stdint.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
@@ -35,15 +35,8 @@
 #endif
 #include <linux/videodev2.h>
 #endif
-#include "libavutil/imgutils.h"
-#include "libavutil/log.h"
-#include "libavutil/opt.h"
-#include "avdevice.h"
-#include "timefilter.h"
-#include "libavutil/parseutils.h"
-#include "libavutil/pixdesc.h"
-#include "libavutil/time.h"
-#include "libavutil/avstring.h"
+#include "libavutil/pixfmt.h"
+#include "libavcodec/codec_id.h"
 
 struct fmt_map {
     enum AVPixelFormat ff_fmt;
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 1f009af4de..5340382d57 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -34,7 +34,15 @@
 
 #include "libavutil/avassert.h"
 #include "libavutil/avstring.h"
+#include "libavutil/imgutils.h"
+#include "libavutil/parseutils.h"
+#include "libavutil/pixdesc.h"
+#include "libavutil/time.h"
+#include "libavcodec/codec_desc.h"
 #include "libavformat/demux.h"
+#include "libavformat/internal.h"
+#include "avdevice.h"
+#include "timefilter.h"
 #include "v4l2-common.h"
 #include <dirent.h>
 
diff --git a/libavdevice/v4l2enc.c b/libavdevice/v4l2enc.c
index 787fe53547..b1006461b7 100644
--- a/libavdevice/v4l2enc.c
+++ b/libavdevice/v4l2enc.c
@@ -18,8 +18,10 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/imgutils.h"
+#include "libavutil/pixdesc.h"
+#include "libavformat/avformat.h"
 #include "v4l2-common.h"
-#include "avdevice.h"
 
 typedef struct {
     AVClass *class;



More information about the ffmpeg-cvslog mailing list