libcamera: v4l2_videodevice: Make V4L2PixelFormat constructor explicit
To achieve the goal of preventing unwanted conversion between a DRM and a V4L2 FourCC, make the V4L2PixelFormat constructor that takes an integer value explicit. All users of V4L2 pixel formats flagged by the compiler are fixed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
6015d9702e
commit
6c34a2d386
6 changed files with 35 additions and 31 deletions
|
@ -69,7 +69,7 @@ int V4L2VideoDeviceTest::init()
|
|||
if (debayer_->open())
|
||||
return TestFail;
|
||||
|
||||
format.fourcc = V4L2_PIX_FMT_SBGGR8;
|
||||
format.fourcc = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8);
|
||||
|
||||
V4L2SubdeviceFormat subformat = {};
|
||||
subformat.mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue