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_yuv.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cam/sdl_texture_yuv.cpp') diff --git a/src/cam/sdl_texture_yuv.cpp b/src/cam/sdl_texture_yuv.cpp index 07df4961..a5721182 100644 --- a/src/cam/sdl_texture_yuv.cpp +++ b/src/cam/sdl_texture_yuv.cpp @@ -14,7 +14,7 @@ SDLTextureYUYV::SDLTextureYUYV(const SDL_Rect &rect, unsigned int stride) { } -void SDLTextureYUYV::update(Span data) +void SDLTextureYUYV::update(const std::vector> &data) { - SDL_UpdateTexture(ptr_, &rect_, data.data(), pitch_); + SDL_UpdateTexture(ptr_, &rect_, data[0].data(), pitch_); } -- cgit v1.2.1