summaryrefslogtreecommitdiff
path: root/src/cam/sdl_texture_mjpg.h
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/sdl_texture_mjpg.h
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/sdl_texture_mjpg.h')
-rw-r--r--src/cam/sdl_texture_mjpg.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cam/sdl_texture_mjpg.h b/src/cam/sdl_texture_mjpg.h
new file mode 100644
index 00000000..b103f801
--- /dev/null
+++ b/src/cam/sdl_texture_mjpg.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2022, Ideas on Board Oy
+ *
+ * sdl_texture_mjpg.h - SDL Texture MJPG
+ */
+
+#pragma once
+
+#include "sdl_texture.h"
+
+class SDLTextureMJPG : public SDLTexture
+{
+public:
+ SDLTextureMJPG(const SDL_Rect &rect);
+ void update(const libcamera::Span<uint8_t> &data) override;
+};