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.
This commit is contained in:
David Coles 2024-06-24 14:49:52 -07:00 committed by Wim Taymans
parent c94d5ed215
commit dd652d01b8
5 changed files with 577 additions and 113 deletions

View file

@ -4,6 +4,7 @@ spa_examples = [
'example-control',
'local-libcamera',
'local-v4l2',
'local-videotestsrc',
]
if not get_option('examples').allowed() or not get_option('spa-plugins').allowed()
@ -12,6 +13,7 @@ endif
spa_examples_extra_deps = {
'local-v4l2': [sdl_dep],
'local-videotestsrc': [sdl_dep],
'local-libcamera': [sdl_dep, libcamera_dep],
}