From 153b468930a9df22debb28889312f8a5c511ee04 Mon Sep 17 00:00:00 2001 From: Eric Curtin Date: Fri, 20 May 2022 20:01:06 +0100 Subject: cam: sdl_sink: Add MJPG support to SDL sink So we have at least two supported capturing pixel formats (although many possible output pixel formats thanks to SDL conversion). MJPG support only built in if SDL2_image is available, provides decompression. Signed-off-by: Eric Curtin Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Tested-by: Jacopo Mondi Signed-off-by: Laurent Pinchart --- src/cam/meson.build | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/cam/meson.build') diff --git a/src/cam/meson.build b/src/cam/meson.build index c17a971f..5957ce14 100644 --- a/src/cam/meson.build +++ b/src/cam/meson.build @@ -25,6 +25,7 @@ cam_cpp_args = [] libdrm = dependency('libdrm', required : false) libsdl2 = dependency('SDL2', required : false) +libsdl2_image = dependency('SDL2_image', required : false) if libdrm.found() cam_cpp_args += [ '-DHAVE_KMS' ] @@ -41,6 +42,13 @@ if libsdl2.found() 'sdl_texture.cpp', 'sdl_texture_yuyv.cpp' ]) + + if libsdl2_image.found() + cam_cpp_args += ['-DHAVE_SDL_IMAGE'] + cam_sources += files([ + 'sdl_texture_mjpg.cpp' + ]) + endif endif cam = executable('cam', cam_sources, @@ -50,6 +58,7 @@ cam = executable('cam', cam_sources, libdrm, libevent, libsdl2, + libsdl2_image, libyaml, ], cpp_args : cam_cpp_args, -- cgit v1.2.1