Keep including the full version.h when headers are included externally

This avoids unnecessary churn and build breakage for users, by
making sure the whole version.h is included like it has been so far,
while keeping the benefit of not needing to rebuild most files in
the ffmpeg tree on minor/micro bumps.

Signed-off-by: Martin Storsjö <martin@martin.st>
release/5.1
Martin Storsjö 3 years ago
parent fce0127642
commit 2d368392a5
  1. 9
      doc/APIchanges
  2. 6
      libavcodec/avcodec.h
  3. 6
      libavdevice/avdevice.h
  4. 6
      libavfilter/avfilter.h
  5. 6
      libavformat/avformat.h
  6. 6
      libpostproc/postprocess.h
  7. 6
      libswresample/swresample.h
  8. 6
      libswscale/swscale.h

@ -14,15 +14,10 @@ libavutil: 2021-04-27
API changes, most recent first:
2022-03-16 - xxxxxxxxxx - all libraries - version.h, version_major.h
No longer implicitly include lib<name>/version.h in lib<name>/<name>.h.
Users who depend on defines from these files (LIB<name>_VERSION*,
LIB<name>_IDENT) must explicitly include these headers instead of
relying on them being included implicitly.
2022-03-16 - xxxxxxxxxx - all libraries - version_major.h
Add lib<name>/version_major.h as new installed headers, which only
contain the major version number (and corresponding API deprecation
defines). These headers are still implicitly included from the
library main headers.
defines).
2022-03-10 - xxxxxxxxxx - lavu 57.23.100 - cpu.h
Add AV_CPU_FLAG_AVX512ICL.

@ -44,6 +44,12 @@
#include "defs.h"
#include "packet.h"
#include "version_major.h"
#ifndef HAVE_AV_CONFIG_H
/* When included as part of the ffmpeg build, only include the major version
* to avoid unnecessary rebuilds. When included externally, keep including
* the full version information. */
#include "version.h"
#endif
/**
* @defgroup libavc libavcodec

@ -20,6 +20,12 @@
#define AVDEVICE_AVDEVICE_H
#include "version_major.h"
#ifndef HAVE_AV_CONFIG_H
/* When included as part of the ffmpeg build, only include the major version
* to avoid unnecessary rebuilds. When included externally, keep including
* the full version information. */
#include "version.h"
#endif
/**
* @file

@ -48,6 +48,12 @@
#include "libavutil/rational.h"
#include "libavfilter/version_major.h"
#ifndef HAVE_AV_CONFIG_H
/* When included as part of the ffmpeg build, only include the major version
* to avoid unnecessary rebuilds. When included externally, keep including
* the full version information. */
#include "libavfilter/version.h"
#endif
/**
* Return the LIBAVFILTER_VERSION_INT constant.

@ -320,6 +320,12 @@
#include "avio.h"
#include "libavformat/version_major.h"
#ifndef HAVE_AV_CONFIG_H
/* When included as part of the ffmpeg build, only include the major version
* to avoid unnecessary rebuilds. When included externally, keep including
* the full version information. */
#include "libavformat/version.h"
#endif
struct AVFormatContext;
struct AVStream;

@ -35,6 +35,12 @@
*/
#include "libpostproc/version_major.h"
#ifndef HAVE_AV_CONFIG_H
/* When included as part of the ffmpeg build, only include the major version
* to avoid unnecessary rebuilds. When included externally, keep including
* the full version information. */
#include "libpostproc/version.h"
#endif
/**
* Return the LIBPOSTPROC_VERSION_INT constant.

@ -126,6 +126,12 @@
#include "libavutil/samplefmt.h"
#include "libswresample/version_major.h"
#ifndef HAVE_AV_CONFIG_H
/* When included as part of the ffmpeg build, only include the major version
* to avoid unnecessary rebuilds. When included externally, keep including
* the full version information. */
#include "libswresample/version.h"
#endif
/**
* @name Option constants

@ -34,6 +34,12 @@
#include "libavutil/log.h"
#include "libavutil/pixfmt.h"
#include "version_major.h"
#ifndef HAVE_AV_CONFIG_H
/* When included as part of the ffmpeg build, only include the major version
* to avoid unnecessary rebuilds. When included externally, keep including
* the full version information. */
#include "version.h"
#endif
/**
* @defgroup libsws libswscale

Loading…
Cancel
Save