summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'wscript')
-rw-r--r--wscript22
1 files changed, 19 insertions, 3 deletions
diff --git a/wscript b/wscript
index 75925c8098..346c319c69 100644
--- a/wscript
+++ b/wscript
@@ -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' ],