[libcamera-devel] [PATCH v2 07/11] [WIP] utils: libtuning: parsers: Add yaml parser
Paul Elder
paul.elder at ideasonboard.com
Sat Oct 22 08:23:06 CEST 2022
Add a parser to libtuning for parsing configuration files in yaml
format.
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
Obviously this doesn't work. Technically it's fine because the only user
of the yaml parser at the moment works fine with no input configuration
file.
---
utils/tuning/libtuning/parsers/__init__.py | 1 +
utils/tuning/libtuning/parsers/yaml_parser.py | 15 +++++++++++++++
2 files changed, 16 insertions(+)
create mode 100644 utils/tuning/libtuning/parsers/yaml_parser.py
diff --git a/utils/tuning/libtuning/parsers/__init__.py b/utils/tuning/libtuning/parsers/__init__.py
index 9d20d2fc..022c1e5d 100644
--- a/utils/tuning/libtuning/parsers/__init__.py
+++ b/utils/tuning/libtuning/parsers/__init__.py
@@ -3,3 +3,4 @@
# Copyright (C) 2022, Paul Elder <paul.elder at ideasonboard.com>
from libtuning.parsers.raspberrypi_parser import RaspberryPiParser
+from libtuning.parsers.yaml_parser import YamlParser
diff --git a/utils/tuning/libtuning/parsers/yaml_parser.py b/utils/tuning/libtuning/parsers/yaml_parser.py
new file mode 100644
index 00000000..e2ce6e20
--- /dev/null
+++ b/utils/tuning/libtuning/parsers/yaml_parser.py
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2022, Paul Elder <paul.elder at ideasonboard.com>
+
+from .parser import Parser
+
+
+class YamlParser(Parser):
+ def __init__(self):
+ super().__init__()
+
+ # todo Implement this (it's fine for now as we don't need a config for
+ # rkisp1 LSC)
+ def _parse(self, config_file, modules):
+ return {}, []
--
2.30.2
More information about the libcamera-devel
mailing list