2016-10-13 21:30:43 +00:00
|
|
|
msdk_sources = [
|
|
|
|
'gstmsdk.c',
|
2016-11-07 20:32:38 +00:00
|
|
|
'gstmsdkdec.c',
|
2016-10-13 21:30:43 +00:00
|
|
|
'gstmsdkenc.c',
|
2016-11-07 20:32:38 +00:00
|
|
|
'gstmsdkh264dec.c',
|
2016-10-13 21:30:43 +00:00
|
|
|
'gstmsdkh264enc.c',
|
2016-11-29 03:14:20 +00:00
|
|
|
'gstmsdkh265dec.c',
|
2016-10-13 21:30:43 +00:00
|
|
|
'gstmsdkh265enc.c',
|
2016-11-22 21:55:00 +00:00
|
|
|
'gstmsdkmjpegdec.c',
|
2016-10-05 22:32:43 +00:00
|
|
|
'gstmsdkmjpegenc.c',
|
2016-10-13 21:30:43 +00:00
|
|
|
'gstmsdkmpeg2enc.c',
|
|
|
|
'gstmsdkvp8enc.c',
|
2016-11-03 17:47:00 +00:00
|
|
|
'msdk.c',
|
2016-10-13 21:30:43 +00:00
|
|
|
]
|
|
|
|
|
2016-11-03 17:47:00 +00:00
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
msdk_sources += 'msdk_d3d.c'
|
|
|
|
else
|
|
|
|
msdk_sources += 'msdk_libva.c'
|
|
|
|
endif
|
|
|
|
|
2016-10-13 21:30:43 +00:00
|
|
|
python3 = find_program('python3')
|
|
|
|
msdk_root = run_command(python3, '-c', 'import os; print(os.environ.get("INTELMEDIASDKROOT", os.environ.get("MFX_HOME", "")))').stdout().strip()
|
|
|
|
|
|
|
|
if msdk_root != ''
|
2016-11-03 17:47:00 +00:00
|
|
|
msdk_libdir = [msdk_root + '/lib/lin_x64', msdk_root + '/lib/x64']
|
2016-10-13 21:30:43 +00:00
|
|
|
msdk_incdir = include_directories(msdk_root + '/include')
|
|
|
|
msdk_lib = cc.find_library('mfx', dirs: msdk_libdir, required: false)
|
2016-11-03 17:47:00 +00:00
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
legacy_stdio_dep = cc.find_library('legacy_stdio_definitions', required: false)
|
|
|
|
d3d11_dep = cc.find_library('d3d11', required: false)
|
|
|
|
msdk_dep = declare_dependency(include_directories: msdk_incdir, dependencies: [msdk_lib, d3d11_dep, legacy_stdio_dep])
|
|
|
|
msdk_dep_found = msdk_lib.found() and d3d11_dep.found() and legacy_stdio_dep.found() and cc.get_id() == 'msvc'
|
|
|
|
else
|
|
|
|
libva_dep = dependency('libva-drm', required: false)
|
|
|
|
libdl_dep = cc.find_library('dl', required: false)
|
|
|
|
msdk_dep = declare_dependency(include_directories: msdk_incdir, dependencies: [msdk_lib, libva_dep, libdl_dep])
|
|
|
|
msdk_dep_found = msdk_lib.found() and libva_dep.found() and libdl_dep.found()
|
|
|
|
endif
|
2016-10-13 21:30:43 +00:00
|
|
|
|
2016-11-03 17:47:00 +00:00
|
|
|
if msdk_dep_found
|
2016-10-13 21:30:43 +00:00
|
|
|
gstmsdktag = library('gstmsdk',
|
|
|
|
msdk_sources,
|
|
|
|
c_args : gst_plugins_bad_args,
|
|
|
|
include_directories : [configinc],
|
|
|
|
dependencies : [gstbase_dep, gstvideo_dep, gstpbutils_dep, msdk_dep],
|
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
endif
|