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:
parent
09044794b4
commit
2bc657f47b
6 changed files with 143 additions and 151 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue