libcamera: Define a PixelFormat type for application-facing formats

Define a PixelFormat type as a simple typedef to an uint32_t. The usage
of a dedicated type creates a cleaner and more self-described API.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2019-10-25 18:09:51 +02:00
committed by Laurent Pinchart
parent 9db0ed5e20
commit 656d875734
4 changed files with 46 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ libcamera_sources = files([
'message.cpp',
'object.cpp',
'pipeline_handler.cpp',
'pixelformats.cpp',
'process.cpp',
'request.cpp',
'signal.cpp',

View File

@@ -0,0 +1,26 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2019, Google Inc.
*
* pixelformats.cpp - libcamera pixel formats
*/
#include <libcamera/pixelformats.h>
/**
* \file pixelformats.h
* \brief libcamera pixel formats
*/
namespace libcamera {
/**
* \typedef PixelFormat
* \brief libcamera image pixel format
*
* The PixelFormat type describes the format of images in the public libcamera
* API. It stores a FourCC value in a 32-bit unsigned integer. The values are
* defined in the Linux kernel V4L2 API (see linux/videodev2.h).
*/
} /* namespace libcamera */