summaryrefslogtreecommitdiff
path: root/src/libcamera
AgeCommit message (Collapse)Author
2022-06-29pipeline: rkisp1: Support IPA tuning fileFlorian Sylvestre
Pass the path name of the YAML IPA tuning file to the IPA module. The file name is derived from the sensor name ("${sensor_name}.yaml"), with a fallback to "uncalibrated.yaml". The tuning file name can be manually overridden with the LIBCAMERA_RKISP1_TUNING_FILE environment variable. Signed-off-by: Florian Sylvestre <fsylvestre@baylibre.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-06-29pipeline: raspberrypi: Advertise ScalerCrop from the pipeline handlerNaushir Patuck
The ScalerCrop control is handled directly by the pipeline handler. Remove the control from the IPA's static ControlInfoMap, and let the pipeline handler add it to the ControlInfoMap advertised to the application, ensuring the limits are set appropriately based on the current sensor mode. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-06-29pipeline: ipa: raspberrypi: Correctly report available control limitsNaushir Patuck
The ipa currently advertises a static ControlInfoMap to specify the available controls and their limits. Fix this limitation by having the IPA populate a new ControlInfoMap with updated limits for ExposureTime, AnalogueGain, and FrameDurationLimits controls based on the current sensor mode. This new ControlInfoMap is then returned back to the pipeline handler and available to the application after a successful Camera::configure() call. Before the first call to Camera::configure(), this ControlInfoMap provides some reasonable default limits for ExposureTime, AnalogueGain, and FrameDurationLimits. However, applications must not rely on these values, but obtain the correct limits after the call to Camera::configure(). Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-06-29pipeline: ipa: raspberrypi: Move ControlInfoMap to the IPANaushir Patuck
Currently the pipeline handler advertises controls handled by the IPA from a static ControlInfoMap defined in the raspberrypi.h header. This change removes this header file, and instead the IPA returns the ControlInfoMap to the pipeline handler from the ipa::init() function. This is done to allow the IPA to adjust the limits of the controls based on the sensor mode in a subsequent change. Bug: https://bugs.libcamera.org/show_bug.cgi?id=83 Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-06-29libcamera: controls: Add SensorTemperature controlNaushir Patuck
Add a SensorTemperature control to return the temperature of the camera sensor in Celsius. This control will only be present in the Request metadata if a thermal sensor is available to the camera sensor. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-06-27libcamera: v4l2_videodevice: Identify non-zero stream startsKieran Bingham
V4L2 Video devices should always start streaming from index zero. Identify and report a warning if they don't, and correct for any offset. Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-06-20libcamera: yaml_parser: Add get() specializations for 16-bit integersLaurent Pinchart
Extend the YamlObject::get() function template to support 16-bit integers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Han-Lin Chen <hanlinchen@chromium.org>
2022-06-20libcamera: yaml_parser: Fix range checks for 32-bit integersLaurent Pinchart
The strtol() and strtoul() functions return long integers, which may be larger than 32-bit integers. Add manual range checks. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Han-Lin Chen <hanlinchen@chromium.org>
2022-06-20libcamera: yaml_parser: Remove memberNames() functionLaurent Pinchart
Now that YamlObject supports iteration, the memberNames() function isn't useful anymore as it can be implemented using utils::map_keys() if really needed. Drop it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Han-Lin Chen <hanlinchen@chromium.org>
2022-06-20libcamera: yaml_parser: Add iterator APILaurent Pinchart
Allow using range-based for loops over YamlObject instances by implementing iterators. New YamlObject::DictAdapter and YamlObject::ListAdapter adapter classes are introduced to provide different iterators depending on the object type. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Han-Lin Chen <hanlinchen@chromium.org>
2022-06-16libcamera: pipeline: simple: Support scaling on the sensorLaurent Pinchart
As the simple pipeline handler targets simple pipelines on the SoC side, it often gets used with platforms that have a YUV sensor capable of outputting different sizes. Extend the heuristics used for pipeline discovery and configuration to scale as much as possible on the sensor side, in order to minimize the required bandwidth. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Reviewed-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-06-16libcamera: pipeline: simple: Store sensor resolution in configurationLaurent Pinchart
When enumerating the supported configurations, store the corresponding sensor resolution in the SimpleCameraData::Configuration structure and use it when configuring the camera, instead of hardcoding the sensor full resolution. This prepares for support of downscaling in the camera sensor. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Reviewed-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-06-16libcamera: pipeline: simple: Factor out format test to separate functionLaurent Pinchart
To prepare for the implementation of a more complex format discovery method, factor out code that tries a pipeline configuration to a separate function. No functional change intended. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Reviewed-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-06-16libcamera: pipeline: simple: Document the pipeline traversal algorithmLaurent Pinchart
Add a section to the documentation at the top of the file to describe in a bit more details how the media graph is traversed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Reviewed-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-06-16libcamera: pipeline: simple: Improve debug message on config failureLaurent Pinchart
When pipeline configuration fails, print the format returned by the kernel in addition to the one requested by libcamera, to ease debugging. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Reviewed-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-06-16libcamera: yaml_parser: Switch from FILE to FileLaurent Pinchart
THe FILE object isn't very user-friendly as it requires manual close. Replace it with File to provide RAII-style resource management in the YamlParser API. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-06-16libcamera: yaml_parser: Extend YamlObject::size() to dictionariesLaurent Pinchart
Dictionaries have a size too, extend the size() function to support them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-06-16libcamera: yaml_object: Turn Type into an enum classLaurent Pinchart
Turn the Type enum into an enum class to force qualifying 'List' and 'Dictionary' in the YamlObject namespace scope. This will help avoiding ambiguities when adding iterator support. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-06-06libcamera: base: log: Color the log prefixLaurent Pinchart
Add coloring to the log prefix to increase log readability. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-06-06libcamera: base: log: Add coloring to the log outputLaurent Pinchart
Extend the logger to support coloring messages. The log level is colorized with per-level colors, and the category with a fixed color. This makes the log output more readable. Coloring is enabled by default when logging to std::cerr, and can be disabled by setting the LIBCAMERA_LOG_NO_COLOR environment variable. When logging to a file with LIBCAMERA_LOG_FILE, coloring is disabled. It can be enabled for file logging using the logSetFile() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-06-06camera_sensor: Suppress error message if test patterns are unavailableNaushir Patuck
If a sensor driver does not support test patterns (e.g. IMX477), libcamera throws an unnecessary error message during initialisation when it sets the test pattern to off. Fix this by moving the error message into setTestPatternMode() where the pipeline handler explicitly requests to set a test pattern. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-06-05libcamera: request: Add operator<<()Jacopo Mondi
With the recent addition of operator<<() in most libcamera core classes to replace usage of the toString() function the Request class was left behind. Add operator<<() for the Request class and reimplement toString(). Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-06-05libcamera: ipu3: Fix rogue whitespaceChristian Rauch
Fix a comment line wrongly indented with spaces instead of tabs. Signed-off-by: Christian Rauch <Rauch.Christian@gmx.de> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-06-03libcamera: v4l2_subdevice: Add YUV8_1X24 media bus formatLaurent Pinchart
The format is used by the i.MX8 ISI driver that will be supported by the simple pipeline handler. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2022-06-03libcamera: v4l2_subdevice: Add RGB565_1X16 media bus formatLaurent Pinchart
The format is used by the i.MX8 ISI driver that will be supported by the simple pipeline handler. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2022-06-03libcamera: v4l2_subdevice: Use MEDIA_BUS_FMT_* macrosLaurent Pinchart
The V4L2_MBUS_FMT_* macros that define media bus formats are deprecated. Use the MEDIA_BUS_FMT_* macros instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2022-06-03libcamera: formats: Add YUV444 and YVU444 pixel formatsLaurent Pinchart
Extend planar YUV format support with 4:4:4 formats. Those formats are used by the i.MX8 ISI driver that will be supported by the simple pipeline handler. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2022-06-03libcamera: formats: Add YVU422 pixel formatLaurent Pinchart
The YVU422 pixel format is defined in both DRM and V4L2. libcamera already supports YUV422, add support for the opposite chroma order. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
2022-06-01libcamera: base: log: Log to std::cerr if log file can't be openedLaurent Pinchart
If the log file specified through LIBCAMERA_LOG_FILE can't be opened, logging is currently completely disabled. This doesn't match the documented behaviour that tells std::cerr is used instead. Fix it to match the documentation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-06-01libcamera: base: log: Replace stderr with std::cerr in documentationLaurent Pinchart
While std::cerr and stderr both target the same file by default, this may be overridden by applications. Update the documentation to use std::cerr instead of stderr to be accurate. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-06-01libcamera: base: log: Remove unnecessary local variableLaurent Pinchart
The output local variable in Logger::logSetTarget() isn't necessary. Remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-06-01libcamera: Fix incorrect toString() to operator<<() conversionsLaurent Pinchart
Commit 8a845ab078c3 ("libcamera: Replace toString with operator<<() for format classes") incorrectly converted some of the toString() usages, resulting in pointer values being printed instead of formats. Fix it. Fixes: 8a845ab078c3 ("libcamera: Replace toString with operator<<() for format classes") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-05-27libcamera: ipa: Move IPA control serialization structures to libcamera namespaceLaurent Pinchart
The C structures used to serialize controls are currently defined in the root namespace, which places them at the root level in the class list generated by Doxygen. Move them to the libcamera namespace to fix that. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-05-27libcamera: pipeline: uvcvideo: Infer camera location from removable attributeLaurent Pinchart
Use the removable attribute exposed by the USB device in sysfs to infer if the camera is an external (when removable) or front (when non-removable) camera. This is likely not perfect as the removable attribute is derived from ACPI data which may not always be accurate, and non-ACPI platforms likely report all devices as removable. Still, this is a first step upon which a better method could be built. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-05-27libcamera: camera_sensor: Add IMX477 sensor propertiesNaushir Patuck
Add an entry to the sensor properties for Sony IMX477. Currently no test pattern modes are supported by the device driver. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-05-25libcamera: controls: Controls for driving AF (autofocus) algorithmsDavid Plowman
This patch describes a series of controls that allow applications to drive AF algorithms: AfMode - manual, auto or continuous AfRange - full, macro or normal AfSpeed - fast or slow AfMetering - how to choose where to measure focus AfWindows - AF window locations AfTrigger - start (trigger) an AF scan or cancel AfPause - pause continuous AF LensPosition - set or retrieve position of lens AfState - reports whether scanning/success/failure AfPauseState - reports whether continuous AF paused or not Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-05-23pipeline: raspberrypi: Fix possible null dereferenceNaushir Patuck
The freeBuffers() cleanup code calls into the IPA to unmap and free shared buffers. However, this function could be called before the IPA has opened (via registerCamera()), causing a segmentation fault. Fix this by guarding against calling the IPA if it has not been opened. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-05-19libcamera: formats: Add missing RGBX8888 infoTomi Valkeinen
Add missing RGBX8888 PixelFormatInfo. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-05-19libcamera: formats: Fix warning printTomi Valkeinen
Remove extra "0x" from the print. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-05-18meson: Compile libyaml as a subproject if not available on the systemLaurent Pinchart
AOSP doesn't ship libyaml, making it more difficult to compile libcamera for Android. Use a meson wrap to compile libyaml as a subproject if the dependency is not found. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Eric Curtin <ecurtin@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
2022-05-13libcamera: camera_sensor: Add OV5675 sensor propertiesQuentin Schulz
Add an entry to the sensor properties for OmniVision OV5675. Only the first test pattern is included as the others that are exposed by the kernel aren't supported by libcamera control yet. Cc: Quentin Schulz <foss+libcamera@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-05-10v4l2_videodevice: Disable the watchdog timer when no buffers are queuedNaushir Patuck
Only enable/reset the watchdog timer when there are buffers queued in the V4L2 device. Otherwise, we may trigger spurious warnings when the watchdog times out even if there are no buffers queued in the device. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Tested-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-05-10libcamera: raspberrypi: Fetch correct value for SensorSensitivityDavid Plowman
These changes retrieve the correct value for sensitivity of the mode selected for the sensor. This value is known to the CamHelper which passes it across to the pipeline handler so that it can be set correctly in the camera properties. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-05-10libcamera: Add a SensorSensitivity propertyNaushir Patuck
The SensorSensitivity property is a scaling factor that describes how sensitive the selected sensor mode is compared to other readout modes of the same sensor. For example, a binned mode might have twice the sensitivity of the full resolution mode, meaning you would get double the signal level for the same exposure and gains. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-05-10meson: Use new project_*_root() functionsTomi Valkeinen
meson.source_root() and meson.build_root() are deprecated. Use meson.project_source_root() and meson.project_build_root() instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2022-05-10libcamera: Introduce YamlParser as a helper to parse yaml filesHan-Lin Chen
Introduce YamlParser as a helper to convert contents of a yaml file to a tree based structure for easier reading, and to avoid writing parser with raw yaml tokens. The class is based on libyaml, and only support reading but not writing a yaml file. The interface is inspired by Json::Value class from jsoncpp: http://jsoncpp.sourceforge.net/class_json_1_1_value.html Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-05-04libcamera: Replace toString with operator<<() for format classesLaurent Pinchart
Now that format classes implement the stream formatting operator<<(), use it instead of the toString() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2022-05-04libcamera: Add operator<<() for V4L2 format classesLaurent Pinchart
Implement the stream output operator<<() for the V4L2DeviceFormat and V4L2SubdeviceFormat classes to simplify printing them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2022-05-04libcamera: bayer_format: Add operator<<()Laurent Pinchart
Implement the stream output operator<<() for the BayerFormat class to simplify printing them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2022-05-04libcamera: Add operator<<() for pixel format classesLaurent Pinchart
Implement the stream output operator<<() for the PixelFormat and V4L2PixelFormat classes to simplify printing them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>