1 have_registry = true # FIXME get_option('registry')
3 libparser = static_library('parser',
6 dependencies : [gst_dep, gstcheck_dep],
9 libparser_dep = declare_dependency(link_with: libparser,
10 sources: ['elements/parser.h'])
13 exif_dep = dependency('libexif', version : '>= 0.6.16', required : false)
15 enable_gst_player_tests = get_option('gst_player_tests')
17 # Need explicit dependency listing for nvenc on Windows
19 if cuda_dep.found() and cudart_dep.found()
20 nvenc_test_deps += [cuda_dep, cudart_dep, gmodule_dep, gstgl_dep]
22 nvenc_test_deps += gstgl_dep
26 # name, condition when to skip the test and extra dependencies
28 [['elements/aiffparse.c']],
29 [['elements/asfmux.c']],
30 [['elements/autoconvert.c']],
31 [['elements/autovideoconvert.c']],
32 [['elements/avwait.c']],
33 [['elements/camerabin.c']],
34 [['elements/gdpdepay.c']],
35 [['elements/gdppay.c']],
36 [['elements/h263parse.c'], false, [libparser_dep, gstcodecparsers_dep]],
37 [['elements/h264parse.c'], false, [libparser_dep, gstcodecparsers_dep]],
38 [['elements/hlsdemux_m3u8.c'], not hls_dep.found(), [hls_dep]],
39 [['elements/id3mux.c']],
40 [['elements/mpegtsmux.c'], false, [gstmpegts_dep]],
41 [['elements/mpeg4videoparse.c'], false, [libparser_dep, gstcodecparsers_dep]],
42 [['elements/mpegvideoparse.c'], false, [libparser_dep, gstcodecparsers_dep]],
43 [['elements/msdkh264enc.c'], not have_msdk, [msdk_dep]],
44 [['elements/mxfdemux.c']],
45 [['elements/mxfmux.c']],
46 [['elements/nvenc.c'], not cuda_dep.found() or not cudart_dep.found(), nvenc_test_deps],
47 [['elements/pcapparse.c'], false, [libparser_dep]],
49 [['elements/rtponvifparse.c']],
50 [['elements/rtponviftimestamp.c']],
51 [['elements/rtpsrc.c']],
52 [['elements/rtpsink.c']],
53 [['elements/videoframe-audiolevel.c']],
54 [['elements/viewfinderbin.c']],
55 [['libs/h264parser.c'], false, [gstcodecparsers_dep]],
56 [['libs/h265parser.c'], false, [gstcodecparsers_dep]],
57 [['libs/insertbin.c'], false, [gstinsertbin_dep]],
58 [['libs/isoff.c'], false, [gstisoff_dep]],
59 [['libs/mpegts.c'], false, [gstmpegts_dep]],
60 [['libs/mpegvideoparser.c'], false, [gstcodecparsers_dep]],
61 [['libs/planaraudioadapter.c'], false, [gstbadaudio_dep]],
62 [['libs/player.c'], not enable_gst_player_tests, [gstplayer_dep]],
63 [['libs/vc1parser.c'], false, [gstcodecparsers_dep]],
64 [['libs/vp8parser.c'], false, [gstcodecparsers_dep]],
65 [['libs/vkmemory.c'], not gstvulkan_dep.found(), [gstvulkan_dep]],
68 # FIXME: unistd dependency, unstable or not tested yet on windows
69 if host_machine.system() != 'windows'
71 [['elements/assrender.c'], not ass_dep.found(), [ass_dep]],
72 [['elements/ccconverter.c']],
73 [['elements/cccombiner.c']],
74 [['elements/ccextractor.c']],
75 [['elements/line21.c']],
76 [['elements/curlhttpsink.c'], not curl_dep.found(), [curl_dep]],
77 [['elements/curlhttpsrc.c'], not curl_dep.found(), [curl_dep, gio_dep]],
78 [['elements/curlfilesink.c'],
79 not curl_dep.found() or not cdata.has('HAVE_UNISTD_H'), [curl_dep]],
80 [['elements/curlftpsink.c'], not curl_dep.found(), [curl_dep]],
81 [['elements/curlsmtpsink.c'], not curl_dep.found(), [curl_dep]],
82 [['elements/dash_mpd.c'], not xml2_dep.found(), [xml2_dep]],
83 [['elements/dtls.c'], not libcrypto_dep.found(), [libcrypto_dep]],
85 not faac_dep.found() or not cc.has_header_symbol('faac.h', 'faacEncOpen') or not cdata.has('HAVE_UNISTD_H'),
88 not faad_dep.found() or not have_faad_2_7 or not cdata.has('HAVE_UNISTD_H'),
90 [['elements/jifmux.c'],
91 not exif_dep.found() or not cdata.has('HAVE_UNISTD_H'), [exif_dep]],
92 [['elements/jpegparse.c'], not cdata.has('HAVE_UNISTD_H')],
94 not kate_dep.found() or not cdata.has('HAVE_UNISTD_H'), [kate_dep]],
95 [['elements/netsim.c']],
96 [['elements/shm.c'], not shm_enabled, shm_deps],
97 [['elements/voaacenc.c'],
98 not voaac_dep.found() or not cdata.has('HAVE_UNISTD_H'), [voaac_dep]],
99 [['elements/webrtcbin.c'], not libnice_dep.found(), [gstwebrtc_dep]],
100 [['elements/x265enc.c'], not x265_dep.found(), [x265_dep]],
101 [['elements/zbar.c'], not zbar_dep.found(), [zbar_dep]],
106 '-UG_DISABLE_ASSERT',
107 '-UG_DISABLE_CAST_CHECKS',
108 '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
109 '-DGST_TEST_FILES_PATH="' + meson.current_source_dir() + '/../files"',
110 '-DTEST_PATH="' + meson.current_build_dir() + '/media"',
111 '-DDASH_MPD_DATADIR=' + meson.current_source_dir() + '/elements/dash_mpd_data',
112 '-DGST_USE_UNSTABLE_API',
115 test_deps = [gst_dep, gstapp_dep, gstbase_dep,
116 gstbasecamerabin_dep, gstphotography_dep,
117 gstpbutils_dep, gstcontroller_dep, gstaudio_dep,
118 gstvideo_dep, gstrtp_dep, gsturidownloader_dep,
119 gstcheck_dep, gio_dep, glib_dep, gsttag_dep]
123 if gst_dep.type_name() == 'pkgconfig'
124 pbase = dependency('gstreamer-plugins-base-' + api_version)
126 pluginsdirs = [gst_dep.get_pkgconfig_variable('pluginsdir')] + [pbase.get_pkgconfig_variable('pluginsdir')]
129 foreach t : base_tests
131 test_name = fnames[0].split('.').get(0).underscorify()
136 extra_deps = t.get(2)
144 exe = executable(test_name, fnames,
145 include_directories : [configinc],
146 c_args : ['-DHAVE_CONFIG_H=1' ] + test_defines,
147 cpp_args : gst_plugins_bad_args,
148 dependencies : [libm] + test_deps + extra_deps,
152 env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
153 env.set('CK_DEFAULT_TIMEOUT', '20')
154 env.set('GST_STATE_IGNORE_ELEMENTS', '')
155 env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
156 env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
157 env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base',
158 'gst-plugins-good', 'gst-plugins-ugly','gst-libav',
159 'gst-plugins-bad@' + meson.build_root())
160 test(test_name, exe, env: env, timeout: 3 * 60)
166 ['orc_bayer', files('../../gst/bayer/gstbayerorc.orc')],
169 orc_test_dep = dependency('', required : false)
171 # FIXME: there should really just be a separate orc-test-0.4.pc file for this
172 if orc_dep.type_name() == 'pkgconfig'
173 orc_test_dep = cc.find_library('orc-test-0.4', required : false)
175 orc_test_dep = dependency('', fallback: ['orc', 'orc_test_dep'], required: false)
179 if have_orcc and orc_test_dep.found()
180 foreach t : orc_tests
183 tcfilename = '@0@.c'.format(tname)
184 test_c = custom_target(tcfilename,
187 command: [orcc, '--include', 'stdint.h', '--test', '-o', '@OUTPUT@', '@INPUT@'])
188 test_exe = executable(tname, test_c, dependencies: [orc_dep, orc_test_dep])
189 test(tname, test_exe)
193 if enable_gst_player_tests