From 953879a15d83704d86a0b054a06d8e2d4730a2cb Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Fri, 15 Jul 2022 14:53:43 +0200 Subject: libcamera: v4l2_pixelformat: Return a format list in fromPixelFormat() As we prepare to associate multiple V4L2 FourCC to a single libcamera format, make the V4L2PixelFormat::fromPixelFormat() return a list of formats and convert all its users to pick the first one. This change prepares to re-introduce V4L2VideoDevice::toV4L2PixelFormat() which will instead match the list of V4L2 FourCC against the formats supported by the video device. While at it, reword the V4L2PixelFormat::fromPixelFormat() documentation to distinguish between planar/multiplanar and contiguous/non-contiguous. Signed-off-by: Jacopo Mondi --- test/libtest/buffer_source.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/libtest/buffer_source.cpp b/test/libtest/buffer_source.cpp index 1b261697..84f1169c 100644 --- a/test/libtest/buffer_source.cpp +++ b/test/libtest/buffer_source.cpp @@ -72,7 +72,7 @@ int BufferSource::allocate(const StreamConfiguration &config) } format.size = config.size; - format.fourcc = V4L2PixelFormat::fromPixelFormat(config.pixelFormat); + format.fourcc = V4L2PixelFormat::fromPixelFormat(config.pixelFormat)[0]; if (video->setFormat(&format)) { std::cout << "Failed to set format on output device" << std::endl; return TestFail; -- cgit v1.2.1