diff options
author | wm4 <wm4@nowhere> | 2020-02-16 15:14:55 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-02-16 15:14:55 +0100 |
commit | 7d11eda72e90d7aa9df25127bd810aa7b191029c (patch) | |
tree | 5c474862236dc62d136fe44dfdf3737bc808b829 /wscript | |
parent | a4eb8f75c0644ce5cf7c0bcea6b3efd2a886027d (diff) | |
download | mpv-7d11eda72e90d7aa9df25127bd810aa7b191029c.tar.bz2 mpv-7d11eda72e90d7aa9df25127bd810aa7b191029c.tar.xz |
Remove remains of Libav compatibility
Libav seems rather dead: no release for 2 years, no new git commits in
master for almost a year (with one exception ~6 months ago). From what I
can tell, some developers resigned themselves to the horrifying idea to
post patches to ffmpeg-devel instead, while the rest of the developers
went on to greener pastures.
Libav was a better project than FFmpeg. Unfortunately, FFmpeg won,
because it managed to keep the name and website. Libav was pushed more
and more into obscurity: while there was initially a big push for Libav,
FFmpeg just remained "in place" and visible for most people. FFmpeg was
slowly draining all manpower and energy from Libav. A big part of this
was that FFmpeg stole code from Libav (regular merges of the entire
Libav git tree), making it some sort of Frankenstein mirror of Libav,
think decaying zombie with additional legs ("features") nailed to it.
"Stealing" surely is the wrong word; I'm just aping the language that
some of the FFmpeg members used to use. All that is in the past now, I'm
probably the only person left who is annoyed by this, and with this
commit I'm putting this decade long problem finally to an end. I just
thought I'd express my annoyance about this fucking shitshow one last
time.
The most intrusive change in this commit is the resample filter, which
originally used libavresample. Since the FFmpeg developer refused to
enable libavresample by default for drama reasons, and the API was
slightly different, so the filter used some big preprocessor mess to
make it compatible to libswresample. All that falls away now. The
simplification to the build system is also significant.
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 72 |
1 files changed, 8 insertions, 64 deletions
@@ -434,69 +434,19 @@ iconv support use --disable-iconv.", } ] -ffmpeg_pkg_config_checks = [ - 'libavutil', '>= 56.12.100', - 'libavcodec', '>= 58.16.100', - 'libavformat', '>= 58.9.100', - 'libswscale', '>= 5.0.101', - 'libavfilter', '>= 7.14.100', - 'libswresample', '>= 3.0.100', -] -libav_pkg_config_checks = [ - 'libavutil', '>= 56.6.0', - 'libavcodec', '>= 58.8.0', - 'libavformat', '>= 58.1.0', - 'libswscale', '>= 5.0.0', - 'libavfilter', '>= 7.0.0', - 'libavresample', '>= 4.0.0', -] - -def check_ffmpeg_or_libav_versions(): - def fn(ctx, dependency_identifier, **kw): - versions = ffmpeg_pkg_config_checks - if ctx.dependency_satisfied('libav'): - versions = libav_pkg_config_checks - return check_pkg_config(*versions)(ctx, dependency_identifier, **kw) - return fn - libav_dependencies = [ { - 'name': 'libavcodec', - 'desc': 'FFmpeg/Libav present', - 'func': check_pkg_config('libavcodec'), - 'req': True, - 'fmsg': "FFmpeg/Libav development files not found.", - }, { - 'name': 'libavutil', - 'desc': 'FFmpeg/Libav libavutil present', - 'func': check_pkg_config('libavutil'), - 'req': True, - 'fmsg': "FFmpeg/Libav libavutil not found.", - }, { 'name': 'ffmpeg', - 'desc': 'libav* is FFmpeg', - # FFmpeg <=> LIBAVUTIL_VERSION_MICRO>=100 - 'func': check_statement('libavcodec/version.h', - 'int x[LIBAVCODEC_VERSION_MICRO >= 100 ? 1 : -1]', - use='libavcodec'), - }, { - # 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 - # the actual version check. - 'name': 'libav', - 'desc': 'libav* is Libav', - # FFmpeg <=> LIBAVUTIL_VERSION_MICRO>=100 - 'func': check_statement('libavcodec/version.h', - 'int x[LIBAVCODEC_VERSION_MICRO >= 100 ? -1 : 1]', - use='libavcodec') - }, { - 'name': 'libav-any', - 'desc': 'Libav/FFmpeg library versions', - 'deps': 'ffmpeg || libav', - 'func': check_ffmpeg_or_libav_versions(), + 'desc': 'FFmpeg library', + 'func': check_pkg_config('libavutil', '>= 56.12.100', + 'libavcodec', '>= 58.16.100', + 'libavformat', '>= 58.9.100', + 'libswscale', '>= 5.0.101', + 'libavfilter', '>= 7.14.100', + 'libswresample', '>= 3.0.100'), 'req': True, 'fmsg': "Unable to find development files for some of the required \ -FFmpeg/Libav libraries. Git master is recommended." +FFmpeg libraries. Git master is recommended." }, { 'name': '--libavdevice', 'desc': 'libavdevice', @@ -590,12 +540,6 @@ video_output_features = [ 'deps': 'vt.h', 'func': check_pkg_config('libdrm', '>= 2.4.74'), }, { - 'name': '--drmprime', - 'desc': 'DRM Prime ffmpeg support', - 'func': check_statement('libavutil/pixfmt.h', - 'int i = AV_PIX_FMT_DRM_PRIME', - use='libavutil') - }, { 'name': '--gbm', 'desc': 'GBM', 'deps': 'gbm.h', |