diff options
Diffstat (limited to 'src/cam/sdl_sink.cpp')
-rw-r--r-- | src/cam/sdl_sink.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cam/sdl_sink.cpp b/src/cam/sdl_sink.cpp index 4c74bce7..f8e3e95d 100644 --- a/src/cam/sdl_sink.cpp +++ b/src/cam/sdl_sink.cpp @@ -21,6 +21,9 @@ #include "event_loop.h" #include "image.h" +#ifdef HAVE_SDL_IMAGE +#include "sdl_texture_mjpg.h" +#endif #include "sdl_texture_yuyv.h" using namespace libcamera; @@ -59,6 +62,11 @@ int SDLSink::configure(const libcamera::CameraConfiguration &config) rect_.h = cfg.size.height; switch (cfg.pixelFormat) { +#ifdef HAVE_SDL_IMAGE + case libcamera::formats::MJPEG: + texture_ = std::make_unique<SDLTextureMJPG>(rect_); + break; +#endif case libcamera::formats::YUYV: texture_ = std::make_unique<SDLTextureYUYV>(rect_); break; |