diff options
author | Barnabás Pőcze <barnabas.pocze@ideasonboard.com> | 2025-04-18 14:30:25 +0200 |
---|---|---|
committer | Barnabás Pőcze <barnabas.pocze@ideasonboard.com> | 2025-05-15 17:41:36 +0200 |
commit | 02f60006cf903cbe74c95ba0b612c5cc11045787 (patch) | |
tree | c878fa66cf267d933183972208a7b1b55aa3591f /src/apps/cam/sdl_texture_yuv.cpp | |
parent | f3a12332f6d987b34893b2a41294dba6db5feb39 (diff) |
apps: cam: sdl_texture: Take list of buffers in span
A non-owning span is sufficient, so use that instead of a vector.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/apps/cam/sdl_texture_yuv.cpp')
-rw-r--r-- | src/apps/cam/sdl_texture_yuv.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/apps/cam/sdl_texture_yuv.cpp b/src/apps/cam/sdl_texture_yuv.cpp index 480d7a37..80a5ec05 100644 --- a/src/apps/cam/sdl_texture_yuv.cpp +++ b/src/apps/cam/sdl_texture_yuv.cpp @@ -15,7 +15,7 @@ SDLTextureNV12::SDLTextureNV12(const SDL_Rect &rect, unsigned int stride) { } -void SDLTextureNV12::update(const std::vector<libcamera::Span<const uint8_t>> &data) +void SDLTextureNV12::update(libcamera::Span<const libcamera::Span<const uint8_t>> data) { SDL_UpdateNVTexture(ptr_, &rect_, data[0].data(), stride_, data[1].data(), stride_); @@ -27,7 +27,7 @@ SDLTextureYUYV::SDLTextureYUYV(const SDL_Rect &rect, unsigned int stride) { } -void SDLTextureYUYV::update(const std::vector<libcamera::Span<const uint8_t>> &data) +void SDLTextureYUYV::update(libcamera::Span<const libcamera::Span<const uint8_t>> data) { SDL_UpdateTexture(ptr_, &rect_, data[0].data(), stride_); } |