2017-06-07 17:04:41 +00:00
|
|
|
pluginsdirs = []
|
|
|
|
if gst_dep.type_name() == 'pkgconfig'
|
2020-05-27 16:32:02 +00:00
|
|
|
pbase = dependency('gstreamer-plugins-base-' + api_version, required: true)
|
|
|
|
pbad = dependency('gstreamer-plugins-bad-' + api_version, required: true)
|
2017-06-07 17:04:41 +00:00
|
|
|
|
2021-10-17 23:40:14 +00:00
|
|
|
pluginsdirs = [gst_dep.get_variable('pluginsdir'),
|
|
|
|
pbase.get_variable('pluginsdir'),
|
|
|
|
pbad.get_variable('pluginsdir')]
|
2020-05-27 16:33:24 +00:00
|
|
|
|
2021-10-17 23:40:14 +00:00
|
|
|
gst_plugin_scanner_dir = gst_dep.get_variable('pluginscannerdir')
|
2020-05-27 16:33:24 +00:00
|
|
|
else
|
|
|
|
gst_plugin_scanner_dir = subproject('gstreamer').get_variable('gst_scanner_dir')
|
2017-06-07 17:04:41 +00:00
|
|
|
endif
|
2020-05-27 16:33:24 +00:00
|
|
|
gst_plugin_scanner_path = join_paths(gst_plugin_scanner_dir, 'gst-plugin-scanner')
|
2016-01-27 01:03:52 +00:00
|
|
|
|
2023-07-12 03:57:22 +00:00
|
|
|
fsmod = import('fs')
|
2016-01-27 01:03:52 +00:00
|
|
|
test_c_args = [
|
|
|
|
'-UG_DISABLE_ASSERT',
|
|
|
|
'-UG_DISABLE_CAST_CHECKS',
|
|
|
|
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_PLUGIN_LOADING_WHITELIST"',
|
2023-07-12 03:57:22 +00:00
|
|
|
'-DGST_TEST_FILES_PATH="' + fsmod.as_posix(meson.current_source_dir()) + '/../files"',
|
2016-01-27 01:03:52 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
rtsp_server_tests = [
|
|
|
|
'gst/addresspool',
|
|
|
|
'gst/client',
|
|
|
|
'gst/mountpoints',
|
|
|
|
'gst/mediafactory',
|
|
|
|
'gst/media',
|
|
|
|
'gst/permissions',
|
|
|
|
'gst/rtspserver',
|
|
|
|
'gst/sessionmedia',
|
|
|
|
'gst/sessionpool',
|
|
|
|
'gst/stream',
|
|
|
|
'gst/threadpool',
|
|
|
|
'gst/token',
|
2019-04-04 22:48:07 +00:00
|
|
|
'gst/onvif',
|
2016-01-27 01:03:52 +00:00
|
|
|
]
|
|
|
|
|
2018-09-19 11:17:57 +00:00
|
|
|
if not get_option('rtspclientsink').disabled()
|
|
|
|
rtsp_server_tests += ['gst/rtspclientsink']
|
|
|
|
endif
|
|
|
|
|
2016-01-27 01:03:52 +00:00
|
|
|
foreach test_name : rtsp_server_tests
|
2017-06-07 16:55:41 +00:00
|
|
|
fname = '@0@.c'.format(test_name)
|
|
|
|
test_name = test_name.underscorify()
|
2020-05-27 16:43:43 +00:00
|
|
|
|
|
|
|
env = environment()
|
|
|
|
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
|
|
|
env.set('GST_STATE_IGNORE_ELEMENTS', '')
|
2021-10-18 14:47:00 +00:00
|
|
|
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer:gst-plugins-base:gst-plugins-good:gst-plugins-bad:gst-rtsp-server@' + meson.project_build_root())
|
2020-05-27 16:43:43 +00:00
|
|
|
env.set('CK_DEFAULT_TIMEOUT', '120')
|
|
|
|
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
|
2021-10-18 14:47:00 +00:00
|
|
|
env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
|
2020-05-27 16:43:43 +00:00
|
|
|
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
|
|
|
|
|
2017-06-07 16:55:41 +00:00
|
|
|
exe = executable(test_name, fname,
|
2016-01-27 01:03:52 +00:00
|
|
|
include_directories : rtspserver_incs,
|
|
|
|
c_args : rtspserver_args + test_c_args,
|
2023-06-26 06:25:36 +00:00
|
|
|
dependencies : [gstcheck_dep, gstrtsp_dep, gstrtp_dep, gst_rtsp_server_dep,
|
|
|
|
gstvideo_dep]
|
2016-01-27 01:03:52 +00:00
|
|
|
)
|
|
|
|
test(test_name, exe,
|
2017-06-07 17:04:41 +00:00
|
|
|
env : env,
|
2016-01-27 01:03:52 +00:00
|
|
|
timeout : 120,
|
2017-06-07 17:04:41 +00:00
|
|
|
is_parallel: false
|
2016-01-27 01:03:52 +00:00
|
|
|
)
|
|
|
|
endforeach
|