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 baa354c64c)
This commit is contained in:
wm4 authored and Diogo Franco (Kovensky) committed 2015-03-11 12:31:53 +09:00
1 parent bbd6501bd3
commit f4393eaa6c
1 file changed
+5 -3
+5 -3
View File
@@ -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'),
}
]