mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 07:42:17 +00:00
Revert "wscript: Require recent FFmpeg by default"
This reverts commit b51957fab5
.
Breaks big time. It appears to ignore explicitly configured paths within
the libav* .pc files, which for example breaks mpv-build.
This commit is contained in:
parent
d38d26057a
commit
1c5fd2d901
69
wscript
69
wscript
@ -389,14 +389,6 @@ iconv support use --disable-iconv.",
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
ffmpeg_pkg_config_checks = [
|
|
||||||
'libavutil', '>= 55.17.103',
|
|
||||||
'libavcodec', '>= 57.24.102',
|
|
||||||
'libavformat', '>= 57.25.100',
|
|
||||||
'libswscale', '>= 4.0.100'
|
|
||||||
]
|
|
||||||
ffmpeg_versions_string = "FFmpeg 3.0.2"
|
|
||||||
|
|
||||||
libav_pkg_config_checks = [
|
libav_pkg_config_checks = [
|
||||||
'libavutil', '>= 54.02.0',
|
'libavutil', '>= 54.02.0',
|
||||||
'libavcodec', '>= 56.1.0',
|
'libavcodec', '>= 56.1.0',
|
||||||
@ -405,27 +397,14 @@ libav_pkg_config_checks = [
|
|||||||
]
|
]
|
||||||
libav_versions_string = "FFmpeg 2.4 or Libav 11"
|
libav_versions_string = "FFmpeg 2.4 or Libav 11"
|
||||||
|
|
||||||
ffmpeg_dependencies = [
|
libav_dependencies = [
|
||||||
{
|
{
|
||||||
'name': 'recent-ffmpeg',
|
'name': 'libav',
|
||||||
'desc': 'recent ffmpeg',
|
'desc': 'libav/ffmpeg',
|
||||||
'func': check_pkg_config(*ffmpeg_pkg_config_checks),
|
|
||||||
}, {
|
|
||||||
'name': '--unsupported-ffmpeg',
|
|
||||||
'desc': 'old libav/ffmpeg',
|
|
||||||
'func': check_pkg_config(*libav_pkg_config_checks),
|
'func': check_pkg_config(*libav_pkg_config_checks),
|
||||||
'default': 'disable',
|
|
||||||
}, {
|
|
||||||
'name': 'ffmpeg',
|
|
||||||
'desc': 'ffmpeg',
|
|
||||||
'deps_any': [ 'recent-ffmpeg', 'unsupported-ffmpeg' ],
|
|
||||||
'func': check_true,
|
|
||||||
'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 \
|
||||||
FFmpeg/Libav libraries. Only {0} or newer is supported.\nIf you wish to build \
|
FFmpeg/Libav libraries. You need at least {0}. Aborting.".format(libav_versions_string)
|
||||||
mpv with older versions (at least {1}), use --enable-unsupported-ffmpeg.\n\
|
|
||||||
This is NOT SUPPORTED, and some player features will not work correctly. \
|
|
||||||
Aborting.".format(ffmpeg_versions_string, libav_versions_string),
|
|
||||||
}, {
|
}, {
|
||||||
'name': '--libswresample',
|
'name': '--libswresample',
|
||||||
'desc': 'libswresample',
|
'desc': 'libswresample',
|
||||||
@ -456,79 +435,79 @@ Aborting.".format(ffmpeg_versions_string, libav_versions_string),
|
|||||||
'desc': 'libavcodec avcodec_enum_to_chroma_pos API',
|
'desc': 'libavcodec avcodec_enum_to_chroma_pos API',
|
||||||
'func': check_statement('libavcodec/avcodec.h', """int x, y;
|
'func': check_statement('libavcodec/avcodec.h', """int x, y;
|
||||||
avcodec_enum_to_chroma_pos(&x, &y, AVCHROMA_LOC_UNSPECIFIED)""",
|
avcodec_enum_to_chroma_pos(&x, &y, AVCHROMA_LOC_UNSPECIFIED)""",
|
||||||
use='ffmpeg')
|
use='libav')
|
||||||
}, {
|
}, {
|
||||||
'name': 'avframe-metadata',
|
'name': 'avframe-metadata',
|
||||||
'desc': 'libavutil AVFrame metadata',
|
'desc': 'libavutil AVFrame metadata',
|
||||||
'func': check_statement('libavutil/frame.h',
|
'func': check_statement('libavutil/frame.h',
|
||||||
'av_frame_get_metadata(NULL)',
|
'av_frame_get_metadata(NULL)',
|
||||||
use='ffmpeg')
|
use='libav')
|
||||||
}, {
|
}, {
|
||||||
'name': 'avframe-skip-samples',
|
'name': 'avframe-skip-samples',
|
||||||
'desc': 'libavutil AVFrame skip samples metadata',
|
'desc': 'libavutil AVFrame skip samples metadata',
|
||||||
'func': check_statement('libavutil/frame.h',
|
'func': check_statement('libavutil/frame.h',
|
||||||
'enum AVFrameSideDataType type = AV_FRAME_DATA_SKIP_SAMPLES',
|
'enum AVFrameSideDataType type = AV_FRAME_DATA_SKIP_SAMPLES',
|
||||||
use='ffmpeg')
|
use='libav')
|
||||||
}, {
|
}, {
|
||||||
'name': 'av-pix-fmt-mmal',
|
'name': 'av-pix-fmt-mmal',
|
||||||
'desc': 'libavutil AV_PIX_FMT_MMAL',
|
'desc': 'libavutil AV_PIX_FMT_MMAL',
|
||||||
'func': check_statement('libavutil/pixfmt.h',
|
'func': check_statement('libavutil/pixfmt.h',
|
||||||
'int x = AV_PIX_FMT_MMAL',
|
'int x = AV_PIX_FMT_MMAL',
|
||||||
use='ffmpeg'),
|
use='libav'),
|
||||||
}, {
|
}, {
|
||||||
'name': 'av-version-info',
|
'name': 'av-version-info',
|
||||||
'desc': 'libavtuil av_version_info()',
|
'desc': 'libavtuil av_version_info()',
|
||||||
'func': check_statement('libavutil/avutil.h',
|
'func': check_statement('libavutil/avutil.h',
|
||||||
'const char *x = av_version_info()',
|
'const char *x = av_version_info()',
|
||||||
use='ffmpeg'),
|
use='libav'),
|
||||||
}, {
|
}, {
|
||||||
'name': 'av-new-pixdesc',
|
'name': 'av-new-pixdesc',
|
||||||
'desc': 'libavutil new pixdesc fields',
|
'desc': 'libavutil new pixdesc fields',
|
||||||
'func': check_statement('libavutil/pixdesc.h',
|
'func': check_statement('libavutil/pixdesc.h',
|
||||||
'AVComponentDescriptor d; int x = d.depth',
|
'AVComponentDescriptor d; int x = d.depth',
|
||||||
use='ffmpeg'),
|
use='libav'),
|
||||||
}, {
|
}, {
|
||||||
'name': 'av-avpacket-int64-duration',
|
'name': 'av-avpacket-int64-duration',
|
||||||
'desc': 'libavcodec 64 bit AVPacket.duration',
|
'desc': 'libavcodec 64 bit AVPacket.duration',
|
||||||
'func': check_statement('libavcodec/avcodec.h',
|
'func': check_statement('libavcodec/avcodec.h',
|
||||||
'int x[(int)sizeof(((AVPacket){0}).duration) - 7]',
|
'int x[(int)sizeof(((AVPacket){0}).duration) - 7]',
|
||||||
use='ffmpeg'),
|
use='libav'),
|
||||||
}, {
|
}, {
|
||||||
'name': 'av-subtitle-nopict',
|
'name': 'av-subtitle-nopict',
|
||||||
'desc': 'libavcodec AVSubtitleRect AVPicture removal',
|
'desc': 'libavcodec AVSubtitleRect AVPicture removal',
|
||||||
'func': check_statement('libavcodec/avcodec.h',
|
'func': check_statement('libavcodec/avcodec.h',
|
||||||
'AVSubtitleRect r = {.linesize={0}}',
|
'AVSubtitleRect r = {.linesize={0}}',
|
||||||
use='ffmpeg'),
|
use='libav'),
|
||||||
}, {
|
}, {
|
||||||
'name': 'avcodec-profile-name',
|
'name': 'avcodec-profile-name',
|
||||||
'desc': 'libavcodec avcodec_profile_name()',
|
'desc': 'libavcodec avcodec_profile_name()',
|
||||||
'func': check_statement('libavcodec/avcodec.h',
|
'func': check_statement('libavcodec/avcodec.h',
|
||||||
'avcodec_profile_name(0,0)',
|
'avcodec_profile_name(0,0)',
|
||||||
use='ffmpeg'),
|
use='libav'),
|
||||||
}, {
|
}, {
|
||||||
'name': 'avcodec-new-codec-api',
|
'name': 'avcodec-new-codec-api',
|
||||||
'desc': 'libavcodec decode/encode API',
|
'desc': 'libavcodec decode/encode API',
|
||||||
'func': check_statement('libavcodec/avcodec.h',
|
'func': check_statement('libavcodec/avcodec.h',
|
||||||
'avcodec_send_packet(0,0)',
|
'avcodec_send_packet(0,0)',
|
||||||
use='ffmpeg'),
|
use='libav'),
|
||||||
}, {
|
}, {
|
||||||
'name': 'avcodec-has-codecpar',
|
'name': 'avcodec-has-codecpar',
|
||||||
'desc': 'libavcodec AVCodecParameters API',
|
'desc': 'libavcodec AVCodecParameters API',
|
||||||
'func': check_statement('libavformat/avformat.h',
|
'func': check_statement('libavformat/avformat.h',
|
||||||
'(void)offsetof(AVStream, codecpar)',
|
'(void)offsetof(AVStream, codecpar)',
|
||||||
use='ffmpeg'),
|
use='libav'),
|
||||||
}, {
|
}, {
|
||||||
'name': 'avutil-has-hwcontext',
|
'name': 'avutil-has-hwcontext',
|
||||||
'desc': 'libavutil AVHWFramesContext API',
|
'desc': 'libavutil AVHWFramesContext API',
|
||||||
'func': check_statement('libavutil/frame.h',
|
'func': check_statement('libavutil/frame.h',
|
||||||
'(void)offsetof(AVFrame, hw_frames_ctx)',
|
'(void)offsetof(AVFrame, hw_frames_ctx)',
|
||||||
use='ffmpeg'),
|
use='libav'),
|
||||||
}, {
|
}, {
|
||||||
'name': 'avutil-st2084',
|
'name': 'avutil-st2084',
|
||||||
'desc': 'libavutil AVCOL_TRC_SMPTEST2084',
|
'desc': 'libavutil AVCOL_TRC_SMPTEST2084',
|
||||||
'func': check_statement('libavutil/pixfmt.h',
|
'func': check_statement('libavutil/pixfmt.h',
|
||||||
'AVCOL_TRC_SMPTEST2084',
|
'AVCOL_TRC_SMPTEST2084',
|
||||||
use='ffmpeg'),
|
use='libav'),
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -863,7 +842,7 @@ hwaccel_features = [
|
|||||||
'name': '--vaapi-hwaccel',
|
'name': '--vaapi-hwaccel',
|
||||||
'desc': 'libavcodec VAAPI hwaccel',
|
'desc': 'libavcodec VAAPI hwaccel',
|
||||||
'deps': [ 'vaapi' ],
|
'deps': [ 'vaapi' ],
|
||||||
'func': check_headers('libavcodec/vaapi.h', use='ffmpeg'),
|
'func': check_headers('libavcodec/vaapi.h', use='libav'),
|
||||||
}, {
|
}, {
|
||||||
'name': '--videotoolbox-hwaccel',
|
'name': '--videotoolbox-hwaccel',
|
||||||
'desc': 'libavcodec videotoolbox hwaccel',
|
'desc': 'libavcodec videotoolbox hwaccel',
|
||||||
@ -872,7 +851,7 @@ hwaccel_features = [
|
|||||||
check_statement('libavcodec/videotoolbox.h',
|
check_statement('libavcodec/videotoolbox.h',
|
||||||
'av_videotoolbox_alloc_context()',
|
'av_videotoolbox_alloc_context()',
|
||||||
framework='IOSurface',
|
framework='IOSurface',
|
||||||
use='ffmpeg')),
|
use='libav')),
|
||||||
} , {
|
} , {
|
||||||
'name': '--videotoolbox-gl',
|
'name': '--videotoolbox-gl',
|
||||||
'desc': 'Videotoolbox with OpenGL',
|
'desc': 'Videotoolbox with OpenGL',
|
||||||
@ -884,14 +863,14 @@ hwaccel_features = [
|
|||||||
'deps': [ 'vdpau' ],
|
'deps': [ 'vdpau' ],
|
||||||
'func': check_statement('libavcodec/vdpau.h',
|
'func': check_statement('libavcodec/vdpau.h',
|
||||||
'av_vdpau_bind_context(0,0,0,AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH)',
|
'av_vdpau_bind_context(0,0,0,AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH)',
|
||||||
use='ffmpeg'),
|
use='libav'),
|
||||||
}, {
|
}, {
|
||||||
'name': '--d3d-hwaccel',
|
'name': '--d3d-hwaccel',
|
||||||
'desc': 'libavcodec DXVA2 and D3D11VA hwaccel',
|
'desc': 'libavcodec DXVA2 and D3D11VA hwaccel',
|
||||||
'deps': [ 'win32' ],
|
'deps': [ 'win32' ],
|
||||||
'func': compose_checks(
|
'func': compose_checks(
|
||||||
check_headers('libavcodec/dxva2.h', use='ffmpeg'),
|
check_headers('libavcodec/dxva2.h', use='libav'),
|
||||||
check_headers('libavcodec/d3d11va.h', use='ffmpeg')),
|
check_headers('libavcodec/d3d11va.h', use='libav')),
|
||||||
}, {
|
}, {
|
||||||
'name': 'sse4-intrinsics',
|
'name': 'sse4-intrinsics',
|
||||||
'desc': 'GCC SSE4 intrinsics for GPU memcpy',
|
'desc': 'GCC SSE4 intrinsics for GPU memcpy',
|
||||||
@ -985,7 +964,7 @@ def options(opt):
|
|||||||
help = 'variant name for saving configuration and build results')
|
help = 'variant name for saving configuration and build results')
|
||||||
|
|
||||||
opt.parse_features('build and install options', build_options)
|
opt.parse_features('build and install options', build_options)
|
||||||
optional_features = main_dependencies + ffmpeg_dependencies
|
optional_features = main_dependencies + libav_dependencies
|
||||||
opt.parse_features('optional features', optional_features)
|
opt.parse_features('optional features', optional_features)
|
||||||
opt.parse_features('audio outputs', audio_output_features)
|
opt.parse_features('audio outputs', audio_output_features)
|
||||||
opt.parse_features('video outputs', video_output_features)
|
opt.parse_features('video outputs', video_output_features)
|
||||||
@ -1046,7 +1025,7 @@ def configure(ctx):
|
|||||||
ctx.parse_dependencies(main_dependencies)
|
ctx.parse_dependencies(main_dependencies)
|
||||||
ctx.parse_dependencies(audio_output_features)
|
ctx.parse_dependencies(audio_output_features)
|
||||||
ctx.parse_dependencies(video_output_features)
|
ctx.parse_dependencies(video_output_features)
|
||||||
ctx.parse_dependencies(ffmpeg_dependencies)
|
ctx.parse_dependencies(libav_dependencies)
|
||||||
ctx.parse_dependencies(hwaccel_features)
|
ctx.parse_dependencies(hwaccel_features)
|
||||||
ctx.parse_dependencies(radio_and_tv_features)
|
ctx.parse_dependencies(radio_and_tv_features)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user