pipewire/spa/examples/meson.build
David Coles dd652d01b8 Port videotestsrc to LoopUtils
The `LoopUtils` interface can be used on platforms that don't
support the Linux-specific `timerfd` interface.

Added `local-videotestsrc` to validate the plugin still functions.

Restructured the SDL event loop as the window would not update
under WSL2, resulting in a black window being shown. All rendering
in SDL2 must happen on the same thread that originally created the
renderer.

To prevent the SDL event loop from being starved, we make sure to
poll it at least every 100 ms.
2024-07-01 15:28:14 +00:00

38 lines
864 B
Meson

# Examples, in order from simple to complicated
spa_examples = [
'adapter-control',
'example-control',
'local-libcamera',
'local-v4l2',
'local-videotestsrc',
]
if not get_option('examples').allowed() or not get_option('spa-plugins').allowed()
subdir_done()
endif
spa_examples_extra_deps = {
'local-v4l2': [sdl_dep],
'local-videotestsrc': [sdl_dep],
'local-libcamera': [sdl_dep, libcamera_dep],
}
foreach c : spa_examples
deps = spa_examples_extra_deps.get(c, [])
found = true
foreach dep : deps
found = found and dep.found()
endforeach
if found
executable(
c,
c + '.c',
include_directories : [configinc],
dependencies : [spa_dep, dl_lib, pthread_lib, mathlib] + deps,
install : installed_tests_enabled,
install_dir : installed_tests_execdir / 'examples' / 'spa'
)
endif
endforeach