[FFmpeg-devel] [PATCH v2 19/69] avcodec/flv.h: Split header into encoder-only and decoder-only headers
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Tue Feb 1 15:06:16 EET 2022
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/flvdec.c | 2 +-
libavcodec/flvdec.h | 29 +++++++++++++++++++++++++++++
libavcodec/flvenc.c | 2 +-
libavcodec/{flv.h => flvenc.h} | 9 +++------
libavcodec/h263dec.c | 2 +-
libavcodec/ituh263dec.c | 3 ---
libavcodec/ituh263enc.c | 2 +-
libavcodec/mpegvideo_enc.c | 2 +-
8 files changed, 37 insertions(+), 14 deletions(-)
create mode 100644 libavcodec/flvdec.h
rename libavcodec/{flv.h => flvenc.h} (87%)
diff --git a/libavcodec/flvdec.c b/libavcodec/flvdec.c
index 2bd86b5b47..62bb32bc62 100644
--- a/libavcodec/flvdec.c
+++ b/libavcodec/flvdec.c
@@ -20,7 +20,7 @@
#include "libavutil/imgutils.h"
-#include "flv.h"
+#include "flvdec.h"
#include "h263dec.h"
#include "mpegvideo.h"
#include "mpegvideodata.h"
diff --git a/libavcodec/flvdec.h b/libavcodec/flvdec.h
new file mode 100644
index 0000000000..3527d82beb
--- /dev/null
+++ b/libavcodec/flvdec.h
@@ -0,0 +1,29 @@
+/*
+ * FLV decoder header.
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_FLVDEC_H
+#define AVCODEC_FLVDEC_H
+
+#include "get_bits.h"
+#include "mpegvideo.h"
+
+int ff_flv_decode_picture_header(MpegEncContext *s);
+
+#endif /* AVCODEC_FLVDEC_H */
diff --git a/libavcodec/flvenc.c b/libavcodec/flvenc.c
index 158b399c40..7271d64af3 100644
--- a/libavcodec/flvenc.c
+++ b/libavcodec/flvenc.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "flv.h"
+#include "flvenc.h"
#include "h263data.h"
#include "mpegvideo.h"
#include "mpegvideodata.h"
diff --git a/libavcodec/flv.h b/libavcodec/flvenc.h
similarity index 87%
rename from libavcodec/flv.h
rename to libavcodec/flvenc.h
index 561cfe0baa..aaa0fcffab 100644
--- a/libavcodec/flv.h
+++ b/libavcodec/flvenc.h
@@ -1,5 +1,5 @@
/*
- * FLV specific private header.
+ * FLV encoder header.
*
* This file is part of FFmpeg.
*
@@ -18,10 +18,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef AVCODEC_FLV_H
-#define AVCODEC_FLV_H
+#ifndef AVCODEC_FLVENC_H
+#define AVCODEC_FLVENC_H
-#include "get_bits.h"
#include "mpegvideo.h"
#include "put_bits.h"
@@ -29,6 +28,4 @@ void ff_flv_encode_picture_header(MpegEncContext *s, int picture_number);
void ff_flv2_encode_ac_esc(PutBitContext *pb, int slevel, int level, int run,
int last);
-int ff_flv_decode_picture_header(MpegEncContext *s);
-
#endif /* AVCODEC_FLV_H */
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 99dc7a74d2..bf2e9b1583 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -31,7 +31,7 @@
#include "avcodec.h"
#include "error_resilience.h"
-#include "flv.h"
+#include "flvdec.h"
#include "h263.h"
#include "h263dec.h"
#if FF_API_FLAG_TRUNCATED
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index b09cc9a2db..5588840c3d 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -28,7 +28,6 @@
*/
#define UNCHECKED_BITSTREAM_READER 1
-#include <limits.h>
#include "libavutil/attributes.h"
#include "libavutil/imgutils.h"
@@ -40,11 +39,9 @@
#include "h263.h"
#include "h263data.h"
#include "h263dec.h"
-#include "internal.h"
#include "mathops.h"
#include "mpegutils.h"
#include "unary.h"
-#include "flv.h"
#include "rv10.h"
#include "mpeg4video.h"
#include "mpegvideodata.h"
diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index 70ac1f643b..c8a95574d2 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -34,12 +34,12 @@
#include "avcodec.h"
#include "mpegvideo.h"
#include "mpegvideodata.h"
+#include "flvenc.h"
#include "h263.h"
#include "h263enc.h"
#include "h263data.h"
#include "mathops.h"
#include "mpegutils.h"
-#include "flv.h"
#include "internal.h"
/**
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 460462d997..7c5d013200 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -63,7 +63,7 @@
#include "faandct.h"
#include "thread.h"
#include "aandcttab.h"
-#include "flv.h"
+#include "flvenc.h"
#include "mpeg4video.h"
#include "mpeg4videodata.h"
#include "mpeg4videoenc.h"
--
2.32.0
More information about the ffmpeg-devel
mailing list