libcamera: formats: Define FormatEnum type

Add an internal format.h and format.cpp files to collect libcamera image
format related types, helpers and structures. Define and document the
FormatEnum type, used to enumerate pixel image formats and associated
image resolutions.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Jacopo Mondi
2019-04-02 11:02:38 +02:00
parent ee81275238
commit 8dcd871fec
5 changed files with 54 additions and 5 deletions
+2 -3
View File
@@ -210,10 +210,9 @@ int V4L2Subdevice::setCompose(unsigned int pad, Rectangle *rect)
* \return A map of image formats associated with a list of image sizes, or
* an empty map on error or if the pad does not exist
*/
const std::map<unsigned int, std::vector<SizeRange>>
V4L2Subdevice::formats(unsigned int pad)
FormatEnum V4L2Subdevice::formats(unsigned int pad)
{
std::map<unsigned int, std::vector<SizeRange>> formatMap = {};
FormatEnum formatMap = {};
struct v4l2_subdev_mbus_code_enum mbusEnum = {};
int ret;