From aff0b680aa9b05d5854ef1c1fb4f268f26383b02 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 5 Jan 2020 04:03:37 +0200 Subject: v4l2: camera_proxy: Rationalize arguments to format helpers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To clarify code, adopt the following rules for format helpers: - All variables representing V4L2 pixel formats shall use uint32_t - All variables representing DRM pixel formats shall use PixelFormat - Functions returning positive values only shall not have a signed return type Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/v4l2/v4l2_camera_proxy.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/v4l2/v4l2_camera_proxy.h') diff --git a/src/v4l2/v4l2_camera_proxy.h b/src/v4l2/v4l2_camera_proxy.h index bef0f0af..3d702084 100644 --- a/src/v4l2/v4l2_camera_proxy.h +++ b/src/v4l2/v4l2_camera_proxy.h @@ -54,12 +54,12 @@ private: int vidioc_streamon(int *arg); int vidioc_streamoff(int *arg); - static int bplMultiplier(unsigned int format); - static int imageSize(unsigned int format, unsigned int width, - unsigned int height); + static unsigned int bplMultiplier(uint32_t format); + static unsigned int imageSize(uint32_t format, unsigned int width, + unsigned int height); - static unsigned int v4l2ToDrm(unsigned int pixelformat); - static unsigned int drmToV4L2(unsigned int pixelformat); + static PixelFormat v4l2ToDrm(uint32_t format); + static uint32_t drmToV4L2(PixelFormat format); unsigned int refcount_; unsigned int index_; -- cgit v1.2.1