examples: add a pull based video player

It has the DRIVER flag set and sets a PW_KEY_PRIORITY_DRIVER value
to something higher than the source so that it becomes the driver.
Every timeout it does pw_stream_drive() to start the graph, which
will eventually call the process function with a pulled buffer to
display.

The framerate is set to something lower (80ms between frames) to
show the pull effect.

fixes #1484
This commit is contained in:
Wim Taymans 2021-08-06 14:46:11 +02:00
parent 23d3b10be4
commit 47fe5b550d
2 changed files with 545 additions and 0 deletions

View file

@ -122,6 +122,12 @@ if sdl_dep.found()
install_dir : installed_tests_execdir / 'examples',
dependencies : [pipewire_dep, sdl_dep, mathlib],
)
executable('video-play-pull',
'video-play-pull.c',
install : installed_tests_enabled,
install_dir : installed_tests_execdir / 'examples',
dependencies : [pipewire_dep, sdl_dep, mathlib],
)
executable('video-dsp-play',
'video-dsp-play.c',
install : installed_tests_enabled,