2019-04-08 11:35:22 +00:00
|
|
|
if get_option('vulkan').disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
2019-11-01 05:22:46 +00:00
|
|
|
|
|
|
|
if not gstvulkan_dep.found()
|
|
|
|
if get_option('vulkan').enabled()
|
|
|
|
error('GStreamer Vulkan plugin required via options, but needed dependencies not found.')
|
|
|
|
else
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2024-06-01 11:35:26 +00:00
|
|
|
extra_deps = []
|
|
|
|
extra_args = []
|
2019-04-08 11:35:22 +00:00
|
|
|
|
2023-05-12 15:13:21 +00:00
|
|
|
vulkan_sources = files(
|
2016-09-09 06:55:23 +00:00
|
|
|
'gstvulkan.c',
|
2021-02-24 17:45:15 +00:00
|
|
|
'gstvulkanelement.c',
|
2019-06-13 07:05:44 +00:00
|
|
|
'vkdownload.c',
|
2019-09-16 05:29:26 +00:00
|
|
|
'vkdeviceprovider.c',
|
2016-09-09 06:55:23 +00:00
|
|
|
'vksink.c',
|
|
|
|
'vkupload.c',
|
2023-05-12 15:13:21 +00:00
|
|
|
)
|
2024-06-01 11:35:26 +00:00
|
|
|
vulkan_plugin_enums = []
|
2016-09-09 06:55:23 +00:00
|
|
|
|
2024-06-01 12:38:11 +00:00
|
|
|
glslc = find_program('glslc', required: false)
|
|
|
|
glslang = find_program('glslang', required: false)
|
|
|
|
if not glslc.found() and not glslang.found()
|
2024-06-01 11:35:26 +00:00
|
|
|
if get_option('vulkan').enabled()
|
2024-06-01 12:38:11 +00:00
|
|
|
error('GStreamer Vulkan plugin required via options, but glslc or glslang was not found.')
|
2024-06-01 11:35:26 +00:00
|
|
|
else
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
vulkan_compiled_shader_sources = []
|
|
|
|
else
|
|
|
|
extra_args += ['-DHAVE_GLSLC']
|
|
|
|
subdir('shaders')
|
|
|
|
|
|
|
|
vulkan_sources += files(
|
|
|
|
'vkcolorconvert.c',
|
|
|
|
'vkimageidentity.c',
|
|
|
|
'vkshaderspv.c',
|
|
|
|
'vkviewconvert.c',
|
|
|
|
'vkoverlaycompositor.c',
|
|
|
|
)
|
|
|
|
vulkan_plugin_enum_headers = files(
|
|
|
|
'vkviewconvert.h',
|
|
|
|
)
|
|
|
|
vulkan_plugin_enums += gnome.mkenums_simple('gstvulkan-plugins-enumtypes',
|
|
|
|
sources : vulkan_plugin_enum_headers,
|
|
|
|
body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
|
|
|
|
header_prefix : '#include <gst/gst.h>')
|
|
|
|
endif
|
2019-07-04 07:22:07 +00:00
|
|
|
|
2023-07-03 11:22:47 +00:00
|
|
|
if vulkan_conf.get('GST_VULKAN_HAVE_VIDEO_EXTENSIONS') == 1
|
2024-02-07 18:07:24 +00:00
|
|
|
vulkan_sources += files('vkh264dec.c', 'vkh265dec.c')
|
2023-07-03 11:22:47 +00:00
|
|
|
extra_deps += gstcodecs_dep
|
2024-02-05 13:18:28 +00:00
|
|
|
extra_args += ['-DGST_USE_UNSTABLE_API']
|
2023-07-03 11:22:47 +00:00
|
|
|
endif
|
|
|
|
|
2019-04-08 11:35:22 +00:00
|
|
|
gstvulkan_plugin = library('gstvulkan',
|
2023-05-12 15:13:21 +00:00
|
|
|
vulkan_sources, vulkan_compiled_shader_sources, vulkan_plugin_enums,
|
2024-02-05 13:18:28 +00:00
|
|
|
c_args : gst_plugins_bad_args + extra_args,
|
2019-04-08 11:35:22 +00:00
|
|
|
objc_args : gst_plugins_bad_args,
|
|
|
|
link_args : noseh_link_args,
|
|
|
|
include_directories : [configinc],
|
2023-07-03 11:22:47 +00:00
|
|
|
dependencies : [gstvideo_dep, gstbase_dep, gstvulkan_dep, vulkan_dep, gio_dep] + extra_deps,
|
2019-04-08 11:35:22 +00:00
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
|
|
|
plugins += [gstvulkan_plugin]
|