libcamera: Introduce YamlParser as a helper to parse yaml files

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>
This commit is contained in:
Han-Lin Chen 2022-04-27 22:09:27 +08:00 committed by Laurent Pinchart
parent c70323e494
commit fcb0ea001a
5 changed files with 774 additions and 2 deletions

View file

@ -60,7 +60,7 @@ Meson Build system: [required]
pip3 install --user --upgrade meson
for the libcamera core: [required]
python3-yaml python3-ply python3-jinja2
libyaml-dev python3-yaml python3-ply python3-jinja2
for IPA module signing: [required]
libgnutls28-dev openssl
@ -98,7 +98,7 @@ for tracing with lttng: [optional]
liblttng-ust-dev python3-jinja2 lttng-tools
for android: [optional]
libexif-dev libjpeg-dev libyaml-dev
libexif-dev libjpeg-dev
for lc-compliance: [optional]
libevent-dev