summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-05 17:10:00 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-03-11 12:31:53 +0900
commitf4393eaa6cd511e3e0f5e3348a135ba2215b4915 (patch)
treeb925a9840e0b345bb076de7f05924ceea93c23f1
parentbbd6501bd31acf74d3098a9629d95a33e2b75968 (diff)
downloadmpv-f4393eaa6cd511e3e0f5e3348a135ba2215b4915.tar.bz2
mpv-f4393eaa6cd511e3e0f5e3348a135ba2215b4915.tar.xz
build: check whether hwaccels are enabled in FFmpeg
FFmpeg can be compiled with them disabled, and then it won't provide the public headers specific to these APIs, causing mpv compilation failure. (cherry picked from commit baa354c64c19ea159fe6574263024c41108c4967)
-rw-r--r--wscript8
1 files changed, 5 insertions, 3 deletions
diff --git a/wscript b/wscript
index b834b4f23d..d6107ea300 100644
--- a/wscript
+++ b/wscript
@@ -691,7 +691,7 @@ hwaccel_features = [
'name': '--vaapi-hwaccel',
'desc': 'libavcodec VAAPI hwaccel',
'deps': [ 'vaapi' ],
- 'func': check_true,
+ 'func': check_statement('libavcodec/vaapi.h', '', use='libav'),
} , {
'name': '--vda-hwaccel',
'desc': 'libavcodec VDA hwaccel',
@@ -710,12 +710,14 @@ hwaccel_features = [
'name': '--vdpau-hwaccel',
'desc': 'libavcodec VDPAU hwaccel',
'deps': [ 'vdpau' ],
- 'func': check_true,
+ 'func': check_statement('libavcodec/vdpau.h',
+ 'av_vdpau_alloc_context()',
+ use='libav'),
}, {
'name': '--dxva2-hwaccel',
'desc': 'libavcodec DXVA2 hwaccel',
'deps': [ 'gdi' ],
- 'func': check_true,
+ 'func': check_statement('libavcodec/dxva2.h', '', use='libav'),
}
]