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:
committed by
Laurent Pinchart
parent
9db0ed5e20
commit
656d875734
@@ -9,6 +9,7 @@ libcamera_api = files([
|
||||
'geometry.h',
|
||||
'logging.h',
|
||||
'object.h',
|
||||
'pixelformats.h',
|
||||
'request.h',
|
||||
'signal.h',
|
||||
'stream.h',
|
||||
|
||||
18
include/libcamera/pixelformats.h
Normal file
18
include/libcamera/pixelformats.h
Normal file
@@ -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__ */
|
||||
Reference in New Issue
Block a user