summaryrefslogtreecommitdiff
path: root/src/cam/meson.build
diff options
context:
space:
mode:
authorEric Curtin <ecurtin@redhat.com>2022-05-20 20:01:06 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-23 12:49:44 +0300
commit153b468930a9df22debb28889312f8a5c511ee04 (patch)
tree2ee7a8b9c25386378858271854157824010eee16 /src/cam/meson.build
parent11554a259f4e8df3cc2ddce0217d35fd7797cfc5 (diff)
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 <ecurtin@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Tested-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/cam/meson.build')
-rw-r--r--src/cam/meson.build9
1 files changed, 9 insertions, 0 deletions
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,