libcamera: v4l2_pixelformat: Move DRM/V4L2 format conversion
Move the DRM/V4L2 format conversion code from V4L2VideoDevice to V4L2PixelFormat. This is a more natural home for the code. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -70,8 +70,8 @@ int BufferSource::allocate(const StreamConfiguration &config)
|
||||
}
|
||||
|
||||
format.size = config.size;
|
||||
format.fourcc = V4L2VideoDevice::toV4L2PixelFormat(config.pixelFormat,
|
||||
false);
|
||||
format.fourcc = V4L2PixelFormat::fromPixelFormat(config.pixelFormat,
|
||||
false);
|
||||
if (video->setFormat(&format)) {
|
||||
std::cout << "Failed to set format on output device" << std::endl;
|
||||
return TestFail;
|
||||
|
||||
Reference in New Issue
Block a user