mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-06 16:56:00 +00:00
meson: ensure all examples are included in doc
Move declaration of examples to use same file lists for build and docs.
This commit is contained in:
parent
6ebd589659
commit
bbc2136e89
|
@ -88,27 +88,13 @@ example_files = [
|
|||
'tutorial4.c',
|
||||
'tutorial5.c',
|
||||
'tutorial6.c',
|
||||
'audio-src.c',
|
||||
'audio-dsp-src.c',
|
||||
'audio-dsp-filter.c',
|
||||
'video-play.c',
|
||||
'video-src.c',
|
||||
'video-dsp-play.c',
|
||||
'video-play-pull.c',
|
||||
'video-play-reneg.c',
|
||||
'video-src-alloc.c',
|
||||
'video-src-reneg.c',
|
||||
'export-sink.c',
|
||||
'export-source.c',
|
||||
'export-spa.c',
|
||||
'export-spa-device.c',
|
||||
'bluez-session.c',
|
||||
'local-v4l2.c',
|
||||
'spa/examples/adapter-control.c',
|
||||
'spa/examples/example-control.c',
|
||||
'spa/examples/local-libcamera.c',
|
||||
'spa/examples/local-v4l2.c',
|
||||
]
|
||||
foreach h : examples
|
||||
example_files += [h + '.c']
|
||||
endforeach
|
||||
foreach h : spa_examples
|
||||
example_files += ['spa/examples/' + h + '.c']
|
||||
endforeach
|
||||
|
||||
example_doxygen = []
|
||||
example_ref = []
|
||||
|
|
|
@ -1,27 +1,32 @@
|
|||
if sdl_dep.found()
|
||||
executable('local-v4l2', 'local-v4l2.c',
|
||||
include_directories : [configinc, spa_inc],
|
||||
dependencies : [dl_lib, sdl_dep, pthread_lib],
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples' / 'spa')
|
||||
# Examples, in order from simple to complicated
|
||||
spa_examples = [
|
||||
'adapter-control',
|
||||
'example-control',
|
||||
'local-libcamera',
|
||||
'local-v4l2',
|
||||
]
|
||||
|
||||
if libcamera_dep.found()
|
||||
executable('local-libcamera', 'local-libcamera.c',
|
||||
include_directories : [configinc, spa_inc],
|
||||
dependencies : [dl_lib, sdl_dep, pthread_lib, libcamera_dep],
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples' / 'spa')
|
||||
spa_examples_extra_deps = {
|
||||
'local-v4l2': [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, spa_inc],
|
||||
dependencies : [dl_lib, pthread_lib, mathlib] + deps,
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples' / 'spa'
|
||||
)
|
||||
endif
|
||||
endif
|
||||
|
||||
executable('example-control', 'example-control.c',
|
||||
include_directories : [configinc, spa_inc],
|
||||
dependencies : [dl_lib, pthread_lib, mathlib],
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples' / 'spa')
|
||||
|
||||
executable('adapter-control', 'adapter-control.c',
|
||||
include_directories : [configinc, spa_inc],
|
||||
dependencies : [dl_lib, pthread_lib, mathlib],
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples' / 'spa')
|
||||
endforeach
|
||||
|
|
|
@ -1,121 +1,50 @@
|
|||
executable('video-src',
|
||||
'video-src.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, mathlib],
|
||||
)
|
||||
executable('video-src-alloc',
|
||||
'video-src-alloc.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, mathlib],
|
||||
)
|
||||
executable('video-src-reneg',
|
||||
'video-src-reneg.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, mathlib],
|
||||
)
|
||||
if drm_dep.found()
|
||||
executable('video-src-fixate',
|
||||
'video-src-fixate.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, drm_dep, mathlib],
|
||||
)
|
||||
endif
|
||||
executable('audio-src',
|
||||
'audio-src.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, mathlib],
|
||||
)
|
||||
executable('audio-dsp-src',
|
||||
'audio-dsp-src.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, mathlib],
|
||||
)
|
||||
executable('export-source',
|
||||
'export-source.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, mathlib],
|
||||
)
|
||||
# Examples, in order from simple to complicated
|
||||
examples = [
|
||||
'audio-src',
|
||||
'audio-dsp-src',
|
||||
'audio-dsp-filter',
|
||||
'video-play',
|
||||
'video-src',
|
||||
'video-dsp-play',
|
||||
'video-play-pull',
|
||||
'video-play-reneg',
|
||||
'video-src-alloc',
|
||||
'video-src-reneg',
|
||||
'video-src-fixate',
|
||||
'video-play-fixate',
|
||||
'export-sink',
|
||||
'export-source',
|
||||
'export-spa',
|
||||
'export-spa-device',
|
||||
'bluez-session',
|
||||
'local-v4l2',
|
||||
]
|
||||
|
||||
executable('audio-dsp-filter',
|
||||
'audio-dsp-filter.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, mathlib],
|
||||
)
|
||||
examples_extra_deps = {
|
||||
'video-src-fixate': [drm_dep],
|
||||
'video-play': [sdl_dep],
|
||||
'video-play-reneg': [sdl_dep],
|
||||
'video-play-fixate': [sdl_dep, drm_dep],
|
||||
'video-play-pull': [sdl_dep],
|
||||
'video-dsp-play': [sdl_dep],
|
||||
'local-v4l2': [sdl_dep],
|
||||
'export-sink': [sdl_dep],
|
||||
}
|
||||
|
||||
executable('export-spa',
|
||||
'export-spa.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, mathlib],
|
||||
)
|
||||
foreach c : examples
|
||||
deps = examples_extra_deps.get(c, [])
|
||||
|
||||
executable('export-spa-device',
|
||||
'export-spa-device.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, mathlib],
|
||||
)
|
||||
found = true
|
||||
foreach dep : deps
|
||||
found = found and dep.found()
|
||||
endforeach
|
||||
|
||||
executable('bluez-session',
|
||||
'bluez-session.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, mathlib],
|
||||
)
|
||||
|
||||
if sdl_dep.found()
|
||||
executable('video-play',
|
||||
'video-play.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, sdl_dep, mathlib],
|
||||
)
|
||||
executable('video-play-reneg',
|
||||
'video-play-reneg.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, sdl_dep, mathlib],
|
||||
)
|
||||
if drm_dep.found()
|
||||
executable('video-play-fixate',
|
||||
'video-play-fixate.c',
|
||||
if found
|
||||
executable(
|
||||
c, c + '.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, sdl_dep, drm_dep, mathlib],
|
||||
dependencies : [pipewire_dep, mathlib] + deps,
|
||||
)
|
||||
endif
|
||||
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,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, sdl_dep, mathlib],
|
||||
)
|
||||
|
||||
executable('local-v4l2',
|
||||
'local-v4l2.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, sdl_dep],
|
||||
)
|
||||
|
||||
executable('export-sink',
|
||||
'export-sink.c',
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir / 'examples',
|
||||
dependencies : [pipewire_dep, sdl_dep, mathlib],
|
||||
)
|
||||
endif
|
||||
endforeach
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
/*
|
||||
[title]
|
||||
Video input stream using \ref pw_stream "pw_stream", with format renegotiation.
|
||||
Video input stream using \ref pw_stream "pw_stream", with format fixation.
|
||||
[title]
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue