avformat/internal: Don't include avcodec.h

The general demuxing API uses parsers and decoders. Therefore
FFStream contains pointers to AVCodecContexts and
AVCodecParserContext and lavf/internal.h includes lavc/avcodec.h.

Yet actually only a few files files really use these; and it is best
when this number stays small. Therefore this commit uses opaque
structs in lavf/internal.h for these contexts and stops including
avcodec.h.
This also avoids including lavc/codec_desc.h implicitly. All other
headers are implicitly included as now (mostly through codec.h).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/388/head
Andreas Rheinhardt 2 years ago
parent a02a0e8db4
commit 2b41463b87
  1. 1
      libavdevice/jack.c
  2. 1
      libavdevice/v4l2.c
  3. 1
      libavformat/asfenc.c
  4. 2
      libavformat/av1dec.c
  5. 1
      libavformat/concatdec.c
  6. 2
      libavformat/dashenc.c
  7. 1
      libavformat/demux.c
  8. 3
      libavformat/dump.c
  9. 1
      libavformat/flacdec.c
  10. 1
      libavformat/flvenc.c
  11. 2
      libavformat/hlsenc.c
  12. 3
      libavformat/internal.h
  13. 1
      libavformat/matroskaenc.c
  14. 1
      libavformat/mpegts.c
  15. 1
      libavformat/mpegtsenc.c
  16. 1
      libavformat/mxfenc.c
  17. 1
      libavformat/oggparseflac.c
  18. 6
      libavformat/rawdec.c
  19. 1
      libavformat/riffenc.c
  20. 1
      libavformat/rtsp.c
  21. 2
      libavformat/seek.c

@ -29,7 +29,6 @@
#include "libavutil/fifo.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavformat/internal.h"
#include "timefilter.h"

@ -38,6 +38,7 @@
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/time.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/codec_desc.h"
#include "libavformat/demux.h"
#include "libavformat/internal.h"

@ -25,6 +25,7 @@
#include "libavutil/dict.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavcodec/codec_desc.h"
#include "avformat.h"
#include "avlanguage.h"
#include "avio_internal.h"

@ -19,11 +19,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include "config_components.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/av1_parse.h"
#include "libavcodec/bsf.h"
#include "avformat.h"

@ -25,6 +25,7 @@
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/timestamp.h"
#include "libavcodec/codec_desc.h"
#include "libavcodec/bsf.h"
#include "avformat.h"
#include "avio_internal.h"

@ -38,6 +38,8 @@
#include "libavutil/time.h"
#include "libavutil/time_internal.h"
#include "libavcodec/avcodec.h"
#include "av1.h"
#include "avc.h"
#include "avformat.h"

@ -34,6 +34,7 @@
#include "libavutil/time.h"
#include "libavutil/timestamp.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/bsf.h"
#include "libavcodec/internal.h"
#include "libavcodec/packet_internal.h"

@ -30,12 +30,13 @@
#include "libavutil/dovi_meta.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/avstring.h"
#include "libavutil/replaygain.h"
#include "libavutil/spherical.h"
#include "libavutil/stereo3d.h"
#include "libavutil/timecode.h"
#include "libavcodec/avcodec.h"
#include "avformat.h"
#include "internal.h"

@ -20,6 +20,7 @@
*/
#include "libavutil/channel_layout.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/bytestream.h"
#include "libavcodec/flac.h"
#include "avformat.h"

@ -24,6 +24,7 @@
#include "libavutil/intfloat.h"
#include "libavutil/avassert.h"
#include "libavutil/mathematics.h"
#include "libavcodec/codec_desc.h"
#include "libavcodec/mpeg4audio.h"
#include "avio.h"
#include "avc.h"

@ -43,6 +43,8 @@
#include "libavutil/time.h"
#include "libavutil/time_internal.h"
#include "libavcodec/avcodec.h"
#include "avformat.h"
#include "avio_internal.h"
#include "avc.h"

@ -23,7 +23,6 @@
#include <stdint.h>
#include "libavcodec/avcodec.h"
#include "libavcodec/packet_internal.h"
#include "avformat.h"
@ -221,7 +220,7 @@ typedef struct FFStream {
/**
* The codec context used by avformat_find_stream_info, the parser, etc.
*/
AVCodecContext *avctx;
struct AVCodecContext *avctx;
/**
* 1 if avctx has been initialized with the values from the codec parameters
*/

@ -58,6 +58,7 @@
#include "libavutil/stereo3d.h"
#include "libavcodec/av1.h"
#include "libavcodec/codec_desc.h"
#include "libavcodec/xiph.h"
#include "libavcodec/mpeg4audio.h"

@ -32,6 +32,7 @@
#include "libavutil/opt.h"
#include "libavutil/avassert.h"
#include "libavutil/dovi_meta.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/bytestream.h"
#include "libavcodec/get_bits.h"
#include "libavcodec/opus.h"

@ -28,6 +28,7 @@
#include "libavutil/opt.h"
#include "libavcodec/ac3_parser_internal.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/startcode.h"
#include "avformat.h"

@ -47,6 +47,7 @@
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/pixdesc.h"
#include "libavutil/time_internal.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/golomb.h"
#include "libavcodec/h264.h"
#include "libavcodec/packet_internal.h"

@ -19,6 +19,7 @@
*/
#include <stdlib.h>
#include "libavcodec/avcodec.h"
#include "libavcodec/get_bits.h"
#include "libavcodec/flac.h"
#include "avformat.h"

@ -24,12 +24,10 @@
#include "avformat.h"
#include "internal.h"
#include "avio_internal.h"
#include "rawdec.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/avcodec.h"
#define RAW_PACKET_SIZE 1024

@ -23,7 +23,6 @@
#include "libavutil/dict.h"
#include "libavutil/log.h"
#include "libavutil/mathematics.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/bytestream.h"
#include "avformat.h"
#include "avio_internal.h"

@ -32,6 +32,7 @@
#include "libavutil/dict.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "libavcodec/codec_desc.h"
#include "avformat.h"
#include "avio_internal.h"

@ -25,6 +25,8 @@
#include "libavutil/mathematics.h"
#include "libavutil/timestamp.h"
#include "libavcodec/avcodec.h"
#include "avformat.h"
#include "avio_internal.h"
#include "demux.h"

Loading…
Cancel
Save