aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-26 01:08:08 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-03 01:59:07 +0200
commitf58038d49815e325fc4215403eaa2d995986af36 (patch)
tree154f7187c0d9b08ad4da06bbb5d2e088c1aadcb4 /libavcodec/avcodec.h
parentea14e8bc3028c746290528869600249c7229bd62 (diff)
downloadffmpeg-f58038d49815e325fc4215403eaa2d995986af36.tar.gz
avcodec/avcodec: Avoid codec_desc.h, codec_par.h inclusions
Instead, use forward declarations; and in order not to affect any user include these headers for them, but not internally. This has the advantage of removing implicit inclusions of these headers from almost all files providing codecs. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index da3c5234a0..09400b97b0 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -31,6 +31,7 @@
#include "libavutil/attributes.h"
#include "libavutil/avutil.h"
#include "libavutil/buffer.h"
+#include "libavutil/channel_layout.h"
#include "libavutil/dict.h"
#include "libavutil/frame.h"
#include "libavutil/log.h"
@@ -38,8 +39,6 @@
#include "libavutil/rational.h"
#include "codec.h"
-#include "codec_desc.h"
-#include "codec_par.h"
#include "codec_id.h"
#include "defs.h"
#include "packet.h"
@@ -49,8 +48,13 @@
* to avoid unnecessary rebuilds. When included externally, keep including
* the full version information. */
#include "version.h"
+
+#include "codec_desc.h"
+#include "codec_par.h"
#endif
+struct AVCodecParameters;
+
/**
* @defgroup libavc libavcodec
* Encoding/Decoding Library
@@ -1815,7 +1819,7 @@ typedef struct AVCodecContext {
* - encoding: unused.
* - decoding: set by libavcodec.
*/
- const AVCodecDescriptor *codec_descriptor;
+ const struct AVCodecDescriptor *codec_descriptor;
/**
* Current statistics for PTS correction.
@@ -2328,7 +2332,7 @@ const AVClass *avcodec_get_subtitle_rect_class(void);
*
* @return >= 0 on success, a negative AVERROR code on failure
*/
-int avcodec_parameters_from_context(AVCodecParameters *par,
+int avcodec_parameters_from_context(struct AVCodecParameters *par,
const AVCodecContext *codec);
/**
@@ -2340,7 +2344,7 @@ int avcodec_parameters_from_context(AVCodecParameters *par,
* @return >= 0 on success, a negative AVERROR code on failure.
*/
int avcodec_parameters_to_context(AVCodecContext *codec,
- const AVCodecParameters *par);
+ const struct AVCodecParameters *par);
/**
* Initialize the AVCodecContext to use the given AVCodec. Prior to using this