diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2019-10-25 18:09:51 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-28 13:07:50 +0200 |
commit | 656d8757347f1f9f5df93da863f66fa589cee063 (patch) | |
tree | 92e1acd4b3fd4fe5176c787ae7a285b7872f1306 /include | |
parent | 9db0ed5e206545c5db389df298601fe2d06e58f4 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/meson.build | 1 | ||||
-rw-r--r-- | include/libcamera/pixelformats.h | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build index ed8ff917..99abf060 100644 --- a/include/libcamera/meson.build +++ b/include/libcamera/meson.build @@ -9,6 +9,7 @@ libcamera_api = files([ 'geometry.h', 'logging.h', 'object.h', + 'pixelformats.h', 'request.h', 'signal.h', 'stream.h', diff --git a/include/libcamera/pixelformats.h b/include/libcamera/pixelformats.h new file mode 100644 index 00000000..6e25b8d8 --- /dev/null +++ b/include/libcamera/pixelformats.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2019, Google Inc. + * + * pixelformats.h - libcamera pixel formats + */ +#ifndef __LIBCAMERA_PIXEL_FORMATS_H__ +#define __LIBCAMERA_PIXEL_FORMATS_H__ + +#include <stdint.h> + +namespace libcamera { + +using PixelFormat = uint32_t; + +} /* namespace libcamera */ + +#endif /* __LIBCAMERA_PIXEL_FORMATS_H__ */ |