videoconvert: add an ffmpeg based video converter

To activate:

PIPEWIRE_PROPS='{ video.adapt.converter = video.convert.ffmpeg }' build/src/examples/video-play

This makes it possible to start firefox with mjpg capture and then
video-play and it will decode the mjpeg transparently. Works for other
incompatible video formats as well, as long as they can be mmapped.

Ideally this should use something GPU accelerated and this is what the
vulkan converter will do.
This commit is contained in:
Wim Taymans 2024-09-06 12:26:14 +02:00
parent b57375ba85
commit 2cbcdbc579
4 changed files with 1958 additions and 5 deletions

View file

@ -310,7 +310,8 @@ ffmpeg = get_option('ffmpeg')
if pw_cat_ffmpeg.allowed() or ffmpeg.allowed()
avcodec_dep = dependency('libavcodec', required: pw_cat_ffmpeg.enabled() or ffmpeg.enabled())
avformat_dep = dependency('libavformat', required: pw_cat_ffmpeg.enabled())
avutil_dep = dependency('libavutil', required: pw_cat_ffmpeg.enabled())
avutil_dep = dependency('libavutil', required: pw_cat_ffmpeg.enabled() or ffmpeg.enabled())
swscale_dep = dependency('libswscale', required: pw_cat_ffmpeg.enabled() or ffmpeg.enabled())
else
avcodec_dep = dependency('', required: false)
endif