summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2022-07-15 14:53:43 +0200
committerJacopo Mondi <jacopo@jmondi.org>2022-07-23 10:54:53 +0200
commit953879a15d83704d86a0b054a06d8e2d4730a2cb (patch)
treeb3ba099ebc427268b2fad8c771e0554ae562c204 /test
parentcd374f31e06e9b334f88d6b32be80094f3781742 (diff)
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 <jacopo@jmondi.org>
Diffstat (limited to 'test')
-rw-r--r--test/libtest/buffer_source.cpp2
1 files changed, 1 insertions, 1 deletions
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;