libcamera: PixelFormat: Make constructor explicit

To achieve the goal of preventing unwanted conversion between a DRM and
a V4L2 FourCC, make the PixelFormat constructor that takes an integer
value explicit. All users of 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>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart 2020-03-16 10:07:26 +02:00 committed by Niklas Söderlund
parent 8c0bbcd3d3
commit 718f5e99a9
9 changed files with 60 additions and 60 deletions

View file

@ -142,7 +142,7 @@ public:
const unsigned int numBuffers = 8;
StreamConfiguration cfg;
cfg.pixelFormat = DRM_FORMAT_YUYV;
cfg.pixelFormat = PixelFormat(DRM_FORMAT_YUYV);
cfg.size = Size(600, 800);
cfg.bufferCount = numBuffers;