summaryrefslogtreecommitdiff
path: root/src/libcamera/formats.cpp
AgeCommit message (Collapse)Author
2020-01-22libcamera: Declare static local variables as const where applicableLaurent Pinchart
We use static local variables to indicate errors in methods that return a const reference. The local variables can thus be const, make them so. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-10-28libcamera: formats: Write libcamera in lowercaseLaurent Pinchart
The libcamera name should never be capitalized. Fix the two incorrect occurrences. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-06-19libcamera: formats: Add missing includeJacopo Mondi
Include errno.h header to fix missing definition of -EEXIST error code: src/libcamera/formats.cpp:43:11: error: use of undeclared identifier 'EEXIST' Fixes: 1cf709b1d2bb ("libcamera: formats: Add ImageFormats") Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-06-19libcamera: v4l2_subdevice: Replace FormatEnum with ImageFormatsNiklas Söderlund
Replace all usage of FormatEnum with ImageFormats and completely remove FormatEnum which is no longer needed. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-06-19libcamera: formats: Add ImageFormatsNiklas Söderlund
Add a new class to hold format information for V4L2 devices and subdevices. The object describes the relationship between either pixel formats (V4L2 devices) or media bus codes (V4L2 subdevice) and a list of image sizes which can be produced with that format. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-04-02libcamera: formats: Define FormatEnum typeJacopo Mondi
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>