17 'gstqsvallocator_d3d11.cpp',
21 'gstqsvallocator_va.cpp',
25 '-DGST_USE_UNSTABLE_API',
28 qsv_option = get_option('qsv')
29 if qsv_option.disabled()
33 qsv_platform_deps = []
34 if host_system == 'windows'
35 # TODO: We can cross-compile this plugin using MinGW but there's an issue.
36 # Re-enable cross-compile once it's investigated and addressed
37 # https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/854
38 if cc.get_id() != 'msvc'
39 if qsv_option.enabled()
40 error('qsv plugin supports only MSVC build')
46 if not gstd3d11_dep.found()
47 if qsv_option.enabled()
48 error('The qsv was enabled explicitly, but required d3d11 was not found')
56 #if !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
57 #error "Not building for UWP"
59 if cc.compiles(code, name : 'building for UWP')
60 if qsv_option.enabled()
61 error('qsv plugin does not support UWP')
67 qsv_sources += qsv_d3d11_sources
68 qsv_platform_deps += [gstd3d11_dep]
69 elif host_system == 'linux' and host_machine.cpu_family() == 'x86_64'
70 if not gstva_dep.found()
71 if qsv_option.enabled()
72 error('The qsv was enabled explicitly, but required va was not found')
77 qsv_sources += qsv_va_sources
78 qsv_platform_deps += [gstva_dep]
80 if qsv_option.enabled()
81 error('QSV plugin supports only Windows or Linux')
87 # suppress deprecated use of MFXInitEx. We don't use the method,
88 # but used in "mfxvideo++.h"
89 # and MinGW 32bits compiler seems to be complaining about redundant-decls
90 if cc.get_id() != 'msvc'
91 extra_args += cc.get_supported_arguments([
92 '-Wno-redundant-decls',
93 '-Wno-deprecated-declarations',
99 gstqsv = library('gstqsv',
101 c_args : gst_plugins_bad_args + extra_args,
102 cpp_args : gst_plugins_bad_args + extra_args,
103 include_directories : [configinc],
104 dependencies : [gstbase_dep, gstvideo_dep, gstcodecparsers_dep, libmfx_internal_dep] + qsv_platform_deps,
106 install_dir : plugins_install_dir,