diff options
author | wm4 <wm4@nowhere> | 2017-05-24 15:07:45 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-05-24 15:25:48 +0200 |
commit | 83a9b0bc4840c1bb203c23194c5f07f898999034 (patch) | |
tree | 0b7047c9623e8da03b31929c84febf69abe64bed /wscript | |
parent | 2426f95e0fc232b01228457e5116b592c56b1f7f (diff) |
videotoolbox: support new libavcodec API
The new API has literally no advantages (other than that we can drop
mp_vt_download_image and other things later), but it's sort-of uniform
with the other hwaccels.
"--videotoolbox-format=no" is not supported with the new API, because it
doesn't "fit in". Probably could be added later again.
The iOS code change is untested (no way to test).
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -769,14 +769,30 @@ hwaccel_features = [ ' ? 1 : -1]', use='libav'), }, { - 'name': '--videotoolbox-hwaccel', - 'desc': 'libavcodec videotoolbox hwaccel', + 'name': '--videotoolbox-hwaccel-new', + 'desc': 'libavcodec videotoolbox hwaccel (new API)', + 'deps': [ 'gl-cocoa' ], + 'func': check_statement('libavcodec/version.h', + 'int x[(LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 96, 100) && ' + ' LIBAVCODEC_VERSION_MICRO >= 100)' + ' ? 1 : -1]', + use='libav'), + }, { + 'name': '--videotoolbox-hwaccel-old', + 'desc': 'libavcodec videotoolbox hwaccel (old API)', + 'deps': [ 'gl-cocoa' ], + 'deps_neg': [ 'videotoolbox-hwaccel-new' ], 'func': compose_checks( check_headers('VideoToolbox/VideoToolbox.h'), check_statement('libavcodec/videotoolbox.h', 'av_videotoolbox_alloc_context()', use='libav')), - } , { + }, { + 'name': 'videotoolbox-hwaccel', + 'desc': 'libavcodec videotoolbox hwaccel', + 'deps_any': [ 'videotoolbox-hwaccel-new', 'videotoolbox-hwaccel-old' ], + 'func': check_true, + }, { 'name': '--videotoolbox-gl', 'desc': 'Videotoolbox with OpenGL', 'deps': [ 'gl-cocoa', 'videotoolbox-hwaccel' ], |