diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-03-17 01:33:58 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-03-19 17:14:21 +0200 |
commit | 6c34a2d386ac99d3732147fe65d0a2cb69ec3856 (patch) | |
tree | 26fa244902584e31f395e3261a4778755fcf48ae /src/libcamera/pipeline/rkisp1/rkisp1.cpp | |
parent | 6015d9702e2920644347d5f497c230f3a7133105 (diff) |
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>
Diffstat (limited to 'src/libcamera/pipeline/rkisp1/rkisp1.cpp')
-rw-r--r-- | src/libcamera/pipeline/rkisp1/rkisp1.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 07d837ab..97bb4f72 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -642,13 +642,13 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c) } V4L2DeviceFormat paramFormat = {}; - paramFormat.fourcc = V4L2_META_FMT_RK_ISP1_PARAMS; + paramFormat.fourcc = V4L2PixelFormat(V4L2_META_FMT_RK_ISP1_PARAMS); ret = param_->setFormat(¶mFormat); if (ret) return ret; V4L2DeviceFormat statFormat = {}; - statFormat.fourcc = V4L2_META_FMT_RK_ISP1_STAT_3A; + statFormat.fourcc = V4L2PixelFormat(V4L2_META_FMT_RK_ISP1_STAT_3A); ret = stat_->setFormat(&statFormat); if (ret) return ret; |