2017-06-21 17:45:04 +00:00
|
|
|
shm_sources = [
|
|
|
|
'shmpipe.c',
|
|
|
|
'shmalloc.c',
|
|
|
|
'gstshm.c',
|
|
|
|
'gstshmsrc.c',
|
|
|
|
'gstshmsink.c',
|
|
|
|
]
|
|
|
|
|
2021-09-18 12:29:25 +00:00
|
|
|
shm_deps = []
|
|
|
|
shm_enabled = false
|
2018-07-27 13:29:23 +00:00
|
|
|
if get_option('shm').disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2021-11-08 19:18:51 +00:00
|
|
|
# NetBSD has shm_* in librt
|
|
|
|
if ['darwin', 'ios', 'freebsd', 'openbsd'].contains(host_system)
|
2018-07-27 13:29:23 +00:00
|
|
|
rt_dep = []
|
|
|
|
shm_enabled = true
|
|
|
|
else
|
|
|
|
rt_dep = cc.find_library ('rt', required: false)
|
|
|
|
shm_enabled = rt_dep.found()
|
|
|
|
endif
|
2017-06-21 17:45:04 +00:00
|
|
|
|
2018-07-27 13:29:23 +00:00
|
|
|
if shm_enabled
|
|
|
|
shm_enabled = cc.has_header('sys/socket.h')
|
|
|
|
elif get_option('shm').enabled()
|
|
|
|
error('shm plugin enabled but librt not found')
|
|
|
|
endif
|
2017-06-21 17:45:04 +00:00
|
|
|
|
2018-07-27 13:29:23 +00:00
|
|
|
if not shm_enabled and get_option('shm').enabled()
|
|
|
|
error('shm plugin enabled but socket.h not found')
|
|
|
|
endif
|
2017-06-21 17:45:04 +00:00
|
|
|
|
2018-07-27 13:29:23 +00:00
|
|
|
if shm_enabled
|
2017-06-21 17:45:04 +00:00
|
|
|
gstshm = library('gstshm',
|
|
|
|
shm_sources,
|
|
|
|
c_args : gst_plugins_bad_args + ['-DSHM_PIPE_USE_GLIB'],
|
|
|
|
include_directories : [configinc],
|
2022-01-15 06:04:05 +00:00
|
|
|
dependencies : [gstbase_dep, rt_dep] + network_deps,
|
2017-06-21 17:45:04 +00:00
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
2018-04-24 18:05:30 +00:00
|
|
|
pkgconfig.generate(gstshm, install_dir : plugins_pkgconfig_install_dir)
|
2018-10-22 09:30:45 +00:00
|
|
|
plugins += [gstshm]
|
2017-06-21 17:45:04 +00:00
|
|
|
endif
|