2020-06-27 04:37:39 +00:00
|
|
|
gst_allocators_headers = files([
|
2016-08-12 15:26:31 +00:00
|
|
|
'allocators.h',
|
2018-03-13 10:19:16 +00:00
|
|
|
'allocators-prelude.h',
|
2016-08-12 15:26:31 +00:00
|
|
|
'gstfdmemory.h',
|
2017-12-19 12:44:35 +00:00
|
|
|
'gstphysmemory.h',
|
2016-08-12 15:26:31 +00:00
|
|
|
'gstdmabuf.h',
|
2023-02-08 21:50:10 +00:00
|
|
|
'gstdrmdumb.h',
|
2023-09-18 18:38:23 +00:00
|
|
|
'gstshmallocator.h',
|
2020-06-27 04:37:39 +00:00
|
|
|
])
|
2016-08-12 15:26:31 +00:00
|
|
|
install_headers(gst_allocators_headers, subdir : 'gstreamer-1.0/gst/allocators/')
|
|
|
|
|
2023-09-18 18:38:23 +00:00
|
|
|
gst_allocators_sources = files([
|
|
|
|
'gstdrmdumb.c',
|
|
|
|
'gstdmabuf.c',
|
|
|
|
'gstfdmemory.c',
|
|
|
|
'gstphysmemory.c',
|
|
|
|
'gstshmallocator.c',
|
|
|
|
])
|
|
|
|
|
|
|
|
gst_allocators_cargs = [
|
|
|
|
gst_plugins_base_args,
|
|
|
|
'-DBUILDING_GST_ALLOCATORS',
|
|
|
|
'-DG_LOG_DOMAIN="GStreamer-Allocators"',
|
|
|
|
]
|
|
|
|
|
|
|
|
if cc.has_function('memfd_create')
|
|
|
|
gst_allocators_cargs += [
|
|
|
|
'-DHAVE_MEMFD_CREATE',
|
|
|
|
'-D_GNU_SOURCE',
|
|
|
|
]
|
2023-09-18 18:38:24 +00:00
|
|
|
elif cc.has_function('shm_open')
|
|
|
|
gst_allocators_cargs += [
|
|
|
|
'-DHAVE_SHM_OPEN',
|
|
|
|
]
|
2023-09-18 18:38:23 +00:00
|
|
|
endif
|
|
|
|
|
2016-08-12 15:26:31 +00:00
|
|
|
gstallocators = library('gstallocators-@0@'.format(api_version),
|
2016-10-20 20:17:27 +00:00
|
|
|
gst_allocators_sources,
|
2023-09-18 18:38:23 +00:00
|
|
|
c_args : gst_allocators_cargs,
|
2016-08-12 15:26:31 +00:00
|
|
|
include_directories: [configinc, libsinc],
|
|
|
|
version : libversion,
|
|
|
|
soversion : soversion,
|
2018-08-31 09:06:30 +00:00
|
|
|
darwin_versions : osxversion,
|
2016-08-12 15:26:31 +00:00
|
|
|
install : true,
|
2023-02-08 21:50:10 +00:00
|
|
|
dependencies : [libdrm_dep, gst_dep],
|
2016-08-12 15:26:31 +00:00
|
|
|
)
|
2016-10-20 20:17:27 +00:00
|
|
|
|
2020-06-27 04:39:00 +00:00
|
|
|
pkg_name = 'gstreamer-allocators-1.0'
|
2018-04-08 00:52:12 +00:00
|
|
|
pkgconfig.generate(gstallocators,
|
2023-02-08 21:50:10 +00:00
|
|
|
libraries : [libdrm_dep, gst_dep],
|
2018-04-08 00:52:12 +00:00
|
|
|
variables : pkgconfig_variables,
|
|
|
|
subdirs : pkgconfig_subdirs,
|
2020-06-27 04:39:00 +00:00
|
|
|
name : pkg_name,
|
2018-04-08 00:52:12 +00:00
|
|
|
description : 'Allocators implementation',
|
|
|
|
)
|
|
|
|
|
2020-06-27 04:39:00 +00:00
|
|
|
library_def = {'lib': gstallocators}
|
2016-10-20 20:17:27 +00:00
|
|
|
allocators_gen_sources = []
|
|
|
|
if build_gir
|
2017-04-12 14:06:45 +00:00
|
|
|
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/allocators/allocators.h' ]
|
2020-06-27 04:39:00 +00:00
|
|
|
gir = {
|
|
|
|
'sources' : gst_allocators_sources + gst_allocators_headers,
|
|
|
|
'namespace' : 'GstAllocators',
|
|
|
|
'nsversion' : api_version,
|
|
|
|
'identifier_prefix' : 'Gst',
|
|
|
|
'symbol_prefix' : 'gst',
|
|
|
|
'export_packages' : pkg_name,
|
|
|
|
'includes' : ['Gst-1.0'],
|
|
|
|
'install' : true,
|
|
|
|
'extra_args' : gst_gir_extra_args,
|
|
|
|
'dependencies' : [gst_dep]
|
|
|
|
}
|
|
|
|
library_def += {'gir': [gir]}
|
|
|
|
if not static_build
|
|
|
|
allocators_gir = gnome.generate_gir(gstallocators, kwargs: gir)
|
2022-08-31 18:15:16 +00:00
|
|
|
library_def += {'gir_targets': library_def.get('gir_targets', []) + [allocators_gir]}
|
2020-06-27 04:39:00 +00:00
|
|
|
allocators_gen_sources += allocators_gir
|
|
|
|
endif
|
2016-10-20 20:17:27 +00:00
|
|
|
endif
|
2022-09-01 15:51:48 +00:00
|
|
|
gst_libraries += [[pkg_name, library_def]]
|
2016-08-12 15:26:31 +00:00
|
|
|
|
|
|
|
allocators_dep = declare_dependency(link_with: gstallocators,
|
|
|
|
include_directories : [libsinc],
|
2016-10-20 20:17:27 +00:00
|
|
|
dependencies : [gst_dep],
|
|
|
|
sources : allocators_gen_sources)
|
2018-04-08 00:52:12 +00:00
|
|
|
|
|
|
|
meson.override_dependency('gstreamer-allocators-1.0', allocators_dep)
|