From d4a42894b158f5f248ca94a8331bb8a40e051e3c Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 6 Aug 2022 17:35:56 +0300 Subject: cam: sdl_sink: Support multi-planar formats In order to prepare for NV12 support, implement support for multi-planar formats in the SDL sink. This mainly consists in passing a vector of plane data to the SDLTexture::update() function instead of a single value. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi Reviewed-by: Eric Curtin Tested-by: Kieran Bingham --- src/cam/sdl_texture.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cam/sdl_texture.h') diff --git a/src/cam/sdl_texture.h b/src/cam/sdl_texture.h index f523fa5e..e4d3fb2b 100644 --- a/src/cam/sdl_texture.h +++ b/src/cam/sdl_texture.h @@ -7,6 +7,8 @@ #pragma once +#include + #include #include "image.h" @@ -17,7 +19,7 @@ public: SDLTexture(const SDL_Rect &rect, uint32_t pixelFormat, const int pitch); virtual ~SDLTexture(); int create(SDL_Renderer *renderer); - virtual void update(libcamera::Span data) = 0; + virtual void update(const std::vector> &data) = 0; SDL_Texture *get() const { return ptr_; } protected: -- cgit v1.2.1