From 29be8034518c0babbf6334d3ef6fc9ffe30e6b70 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Tue, 10 Jan 2023 08:49:30 +0000 Subject: lib/mjpeg_encoder: Add an MJPEG encoder for YUV420 data MJPEG is an extremely useful format given its compression allows high framerates even over limited bandwith USB connections. Add an MJPEG encoder class that converts YUV420 data into MJPEG data. Where a libcamera-source does not support MJPEG natively, convert YUV420 into MJPEG if the user tries to set MJPEG format. Reviewed-by: Kieran Bingham Signed-off-by: Daniel Scally --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 8101676..a8b54d1 100644 --- a/meson.build +++ b/meson.build @@ -54,6 +54,8 @@ summary({ 'Sources': uvc_gadget_git_version, }, section : 'Versions') cc = meson.get_compiler('c') libcamera = dependency('libcamera', required : false) +libjpeg = dependency('libjpeg', required : false) +threads = dependency('threads', required : false) conf = configuration_data() @@ -61,6 +63,10 @@ if libcamera.found() conf.set('HAVE_LIBCAMERA', true) endif +if libjpeg.found() and threads.found() + conf.set('CONFIG_CAN_ENCODE', true) +endif + configure_file(output : 'config.h', configuration : conf) config_includes = include_directories('.') -- cgit v1.2.3