mirror of https://github.com/mpv-player/mpv
build: make it easier to force FFmpeg upstream
Apparently some people want this. Actually making it compile is still their problem, though, and I expect that build with FFmpeg upstream will occasionally be broken (as it is right now). This is because mpv also relies on API provided by Libav, and if FFmpeg hasn't merged that yet, it's not our problem - we provide a version of FFmpeg upstream with those changes merged, and it's called ffmpeg-mpv. Also adjust the README which still talked about FFmpeg releases.
This commit is contained in:
parent
501230f2a0
commit
a7a1ae0b3d
17
README.md
17
README.md
|
@ -147,17 +147,14 @@ with FFmpeg only (subtitle formats in particular).
|
||||||
|
|
||||||
## Preferred FFmpeg version
|
## Preferred FFmpeg version
|
||||||
|
|
||||||
|
Only [ffmpeg-mpv][ffmpeg-mpv] is supported. Upstream FFmpeg can be forced by
|
||||||
|
passing a certain switch to configure, but compilation or runtime behavior
|
||||||
|
might be broken at times.
|
||||||
|
|
||||||
Using the latest FFmpeg release (or FFmpeg git master) is strongly recommended.
|
_If_ you force upstream FFmpeg, and it doesn't work, please contact upstream
|
||||||
Older versions are unsupported, even if the build system still happens to
|
FFmpeg for help, instead of mpv. See
|
||||||
accept them. The main reason mpv still builds with older FFmpeg versions is to
|
[FFmpeg contact][http://ffmpeg.org/contact.html#MailingLists] how to contact
|
||||||
evade arguing with people (users, distros) who insist on using older FFmpeg
|
FFmpeg upstream.
|
||||||
versions for no rational reason.
|
|
||||||
|
|
||||||
If you want to use a stable FFmpeg release, use the latest release, which has
|
|
||||||
most likely the best maintenance out of all stable releases. Older releases
|
|
||||||
are for distros, and at best receive basic changes, like fixing critical security
|
|
||||||
issues or build fixes, and at worst are completely abandoned.
|
|
||||||
|
|
||||||
## FFmpeg ABI compatibility
|
## FFmpeg ABI compatibility
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "fmt-conversion.h"
|
#include "fmt-conversion.h"
|
||||||
#include "format.h"
|
#include "format.h"
|
||||||
|
|
||||||
#define HAVE_LIBSWRESAMPLE HAVE_FFMPEG_MPV
|
#define HAVE_LIBSWRESAMPLE (!HAVE_LIBAV)
|
||||||
#define HAVE_LIBAVRESAMPLE HAVE_LIBAV
|
#define HAVE_LIBAVRESAMPLE HAVE_LIBAV
|
||||||
|
|
||||||
#if HAVE_LIBAVRESAMPLE
|
#if HAVE_LIBAVRESAMPLE
|
||||||
|
|
|
@ -44,8 +44,7 @@
|
||||||
|
|
||||||
#if HAVE_LIBAV
|
#if HAVE_LIBAV
|
||||||
#include <libavresample/avresample.h>
|
#include <libavresample/avresample.h>
|
||||||
#endif
|
#else
|
||||||
#if HAVE_FFMPEG_MPV
|
|
||||||
#include <libswresample/swresample.h>
|
#include <libswresample/swresample.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -199,8 +198,7 @@ bool print_libav_versions(struct mp_log *log, int v)
|
||||||
{"libavfilter", LIBAVFILTER_VERSION_INT, avfilter_version()},
|
{"libavfilter", LIBAVFILTER_VERSION_INT, avfilter_version()},
|
||||||
#if HAVE_LIBAV
|
#if HAVE_LIBAV
|
||||||
{"libavresample", LIBAVRESAMPLE_VERSION_INT, avresample_version()},
|
{"libavresample", LIBAVRESAMPLE_VERSION_INT, avresample_version()},
|
||||||
#endif
|
#else
|
||||||
#if HAVE_FFMPEG_MPV
|
|
||||||
{"libswresample", LIBSWRESAMPLE_VERSION_INT, swresample_version()},
|
{"libswresample", LIBSWRESAMPLE_VERSION_INT, swresample_version()},
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
13
wscript
13
wscript
|
@ -458,21 +458,22 @@ libav_dependencies = [
|
||||||
'req': True,
|
'req': True,
|
||||||
'fmsg': "FFmpeg/Libav development files not found.",
|
'fmsg': "FFmpeg/Libav development files not found.",
|
||||||
}, {
|
}, {
|
||||||
'name': 'ffmpeg_mpv',
|
'name': 'ffmpeg-mpv',
|
||||||
'desc': 'libav* is FFmpeg mpv modified version',
|
'desc': 'libav* is FFmpeg mpv modified version',
|
||||||
'func': check_statement('libavcodec/version.h',
|
'func': check_statement('libavcodec/version.h',
|
||||||
'int x[LIBAVCODEC_MPV ? 1 : -1]',
|
'int x[LIBAVCODEC_MPV ? 1 : -1]',
|
||||||
use='libavcodec')
|
use='libavcodec')
|
||||||
}, {
|
}, {
|
||||||
'name': 'ffmpeg_garbage',
|
'name': '--ffmpeg-garbage',
|
||||||
'deps': '!ffmpeg_mpv',
|
'deps': '!ffmpeg-mpv',
|
||||||
'desc': 'libav* is upstream FFmpeg (unsupported)',
|
'desc': 'libav* is upstream FFmpeg (unsupported)',
|
||||||
# FFmpeg <=> LIBAVUTIL_VERSION_MICRO>=100
|
# FFmpeg <=> LIBAVUTIL_VERSION_MICRO>=100
|
||||||
'func': check_statement('libavcodec/version.h',
|
'func': check_statement('libavcodec/version.h',
|
||||||
'int x[LIBAVCODEC_VERSION_MICRO >= 100 ? 1 : -1]',
|
'int x[LIBAVCODEC_VERSION_MICRO >= 100 ? 1 : -1]',
|
||||||
use='libavcodec')
|
use='libavcodec'),
|
||||||
|
'default': 'disable',
|
||||||
}, {
|
}, {
|
||||||
# This check should always result in the opposite of is_ffmpeg.
|
# This check should always result in the opposite of ffmpeg-*.
|
||||||
# Run it to make sure is_ffmpeg didn't fail for some other reason than
|
# Run it to make sure is_ffmpeg didn't fail for some other reason than
|
||||||
# the actual version check.
|
# the actual version check.
|
||||||
'name': 'libav',
|
'name': 'libav',
|
||||||
|
@ -484,7 +485,7 @@ libav_dependencies = [
|
||||||
}, {
|
}, {
|
||||||
'name': 'libav-any',
|
'name': 'libav-any',
|
||||||
'desc': 'Libav/FFmpeg library versions',
|
'desc': 'Libav/FFmpeg library versions',
|
||||||
'deps': 'ffmpeg_mpv || libav',
|
'deps': 'ffmpeg-mpv || ffmpeg-garbage || libav',
|
||||||
'func': check_ffmpeg_or_libav_versions(),
|
'func': check_ffmpeg_or_libav_versions(),
|
||||||
'req': True,
|
'req': True,
|
||||||
'fmsg': "Unable to find development files for some of the required \
|
'fmsg': "Unable to find development files for some of the required \
|
||||||
|
|
Loading…
Reference in New Issue