meson: Rework FFmpeg / tinycompress detection and add pw-cat-ffmpeg option

* Decouple FFmpeg integration in pw-cat from the ffmpeg option; if
  one wants to use Compress-Offload but not the ffmpeg SPA plugin,
  it is then possible to just pass -Dpw-cat-ffmpeg=enabled to meson.
  Likewise, this also makes it possible to build the ffmpeg plugin
  without extending pw-cat.
* tinycompress does not need to be detected in the root meson.build,
  since it is only needed by the alsa plugin.
This commit is contained in:
Carlos Rafael Giani 2022-11-23 16:22:30 +01:00 committed by Wim Taymans
parent e9a2c6aa34
commit 6284cf39c0
4 changed files with 29 additions and 12 deletions

View file

@ -83,6 +83,10 @@ if get_option('spa-plugins').allowed()
libcamera_dep = dependency('libcamera', required: get_option('libcamera'))
summary({'libcamera': libcamera_dep.found()}, bool_yn: true, section: 'Backend')
tinycompress_dep = cc.find_library('tinycompress', has_headers: ['tinycompress/tinycompress.h' ], required: get_option('compress-offload'))
summary({'Compress-Offload': tinycompress_dep.found()}, bool_yn: true, section: 'Backend')
cdata.set('HAVE_ALSA_COMPRESS_OFFLOAD', tinycompress_dep.found())
# common dependencies
libudev_dep = dependency('libudev', required: alsa_dep.found() or get_option('udev').enabled() or get_option('v4l2').enabled())
summary({'Udev': libudev_dep.found()}, bool_yn: true, section: 'Backend')