{"id":15707,"url":"https://patchwork.libcamera.org/api/1.1/patches/15707/?format=json","web_url":"https://patchwork.libcamera.org/patch/15707/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220425144617.2549778-4-hanlinchen@chromium.org>","date":"2022-04-25T14:46:17","name":"[libcamera-devel,v5,3/3] android: camera_hal_config: Use YamlParser to parse android HAL config","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"14505f2647e2daa07466aa6f0e03ad948069b6e0","submitter":{"id":98,"url":"https://patchwork.libcamera.org/api/1.1/people/98/?format=json","name":"Hanlin Chen","email":"hanlinchen@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/15707/mbox/","series":[{"id":3068,"url":"https://patchwork.libcamera.org/api/1.1/series/3068/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3068","date":"2022-04-25T14:46:14","name":"Introduce YamlParser for YAML files","version":5,"mbox":"https://patchwork.libcamera.org/series/3068/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/15707/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/15707/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id EF554C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 25 Apr 2022 14:46:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A20F665650;\n\tMon, 25 Apr 2022 16:46:32 +0200 (CEST)","from mail-pl1-x632.google.com (mail-pl1-x632.google.com\n\t[IPv6:2607:f8b0:4864:20::632])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A381604A9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 Apr 2022 16:46:30 +0200 (CEST)","by mail-pl1-x632.google.com with SMTP id h12so23669386plf.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 Apr 2022 07:46:30 -0700 (PDT)","from localhost ([2401:fa00:1:17:38a2:b0a:67fa:9b05])\n\tby smtp.gmail.com with UTF8SMTPSA id\n\tt7-20020a17090a5d8700b001cd4989ff64sm14809790pji.43.2022.04.25.07.46.27\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tMon, 25 Apr 2022 07:46:28 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1650897992;\n\tbh=fsKyd4+IjSGybWpAR7NIi8bqJ3d4pZmfstg1MSQiR4U=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=wK2+n9wup7JQKLKlCUhiI/v1ZR/fN3FJDZxGzhsRg+O7DpMYzujVmSiTwl7GIUH5T\n\tKpqT5siZfFJgKPou3z//v0YuwF59Vq2ddixUEjLPc16xnKeqHpGxiTaljceDr4IEE4\n\t2OuKKGhr4dizBY8Xeuu/YDM4GGO6Zy458TB4gpDnRgKONjfbsQ9d7zsfGRWyAKoiua\n\tlSFowzbVc5EL7ZUTVPF3crjH4qVNPipUf9SL/K04lNqe8J56a9GkaNEIhlK8YFcW18\n\tc+Ct8mlHtK3P/zGzgZdEHk5E7GhR6NCP2eD1fen8+aLf5ftNhiftraGsf4fWfWdLpP\n\tviGRThpf36NbA==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=UK/N9QOQ5ZUoMMU+80Rv9jNpnZBZy3QfzA53edv39NI=;\n\tb=dLR3JPQCtigIdNrrLrLF9Y4rvs183J5aYREZHMHlOC39gNYp7u25Q8EpXOJGHDfBig\n\tJbwJx39R1LqSUJCql8jTfjzLkYiMfnggSqgkGcD/qWJvuDsnu/6c0GjHDU9Oi6flyqc0\n\tI2YJfwaVTOaOFT+12ava1PKz/lYiJ5NGnUzqk="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"dLR3JPQC\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=UK/N9QOQ5ZUoMMU+80Rv9jNpnZBZy3QfzA53edv39NI=;\n\tb=UEL6EXwv3AoDtTXLWrpHLgnuDLjge/n8ymWgiGS+QqBtUhm1JqQvITSS9gOcYjm3xB\n\tZKGgm0d7I7uNKefhWw73i1ym6qmKh19vDCJl8jaS49tmKDyc3LJTeWXePct1XqR3My+3\n\tjR5pusmkTm+2URJ01YuHNLUooYszdNYHFmx3WJFdKmn7mRCaFbhfp5JAo8eRwOQ53nsx\n\tqetp8ozAyWWEHgcWjzIIjfdCDwXcT7d85RxyPf9K8nhA4RO6GrDh8IXcoF7zaQUMRz+7\n\tSbROA+5tHRGDRzE+hqc3TBpkRJZsxCMcquefxrzB9rqh29fcyTb83SQLRdti2mZyw2xB\n\tJaxA==","X-Gm-Message-State":"AOAM530c/wFXqKnrJ5lFka8DG3XUqIdMF/84CveYwtgFtqJm7c2z/xBs\n\ttEQQl0N573GktUPU3ZoBpCMmounm6sx5Aw==","X-Google-Smtp-Source":"ABdhPJyL/fZSSI0q9knuyk2B1CF3sh59uTAAwIp4r8Vp7t8uIdUdPT9O+3+YEc/N/9GHwgYt9pwH9w==","X-Received":"by 2002:a17:90b:1646:b0:1d9:7e9b:60aa with SMTP id\n\til6-20020a17090b164600b001d97e9b60aamr4873536pjb.28.1650897988768; \n\tMon, 25 Apr 2022 07:46:28 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 25 Apr 2022 22:46:17 +0800","Message-Id":"<20220425144617.2549778-4-hanlinchen@chromium.org>","X-Mailer":"git-send-email 2.36.0.rc2.479.g8af0fa9b8e-goog","In-Reply-To":"<20220425144617.2549778-1-hanlinchen@chromium.org>","References":"<20220425144617.2549778-1-hanlinchen@chromium.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v5 3/3] android: camera_hal_config: Use\n\tYamlParser to parse android HAL config","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Han-Lin Chen via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Han-Lin Chen <hanlinchen@chromium.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Use YamlParser to parse android HAL config files, instead of handling\nYAML tokens directly, as a preparation for the further parameter extension.\n\nSigned-off-by: Han-Lin Chen <hanlinchen@chromium.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_hal_config.cpp | 334 +++++++-----------------------\n src/android/meson.build           |   1 -\n 2 files changed, 74 insertions(+), 261 deletions(-)","diff":"diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp\nindex aa90dac7..d269ab25 100644\n--- a/src/android/camera_hal_config.cpp\n+++ b/src/android/camera_hal_config.cpp\n@@ -14,15 +14,15 @@ namespace filesystem = std::experimental::filesystem;\n #else\n #include <filesystem>\n #endif\n-#include <stdio.h>\n #include <stdlib.h>\n #include <string>\n-#include <yaml.h>\n \n #include <hardware/camera3.h>\n \n #include <libcamera/base/log.h>\n \n+#include <libcamera/internal/yaml_parser.h>\n+\n using namespace libcamera;\n \n LOG_DEFINE_CATEGORY(HALConfig)\n@@ -37,16 +37,10 @@ public:\n \tint parseConfigFile(FILE *fh, std::map<std::string, CameraConfigData> *cameras);\n \n private:\n-\tstd::string parseValue();\n-\tstd::string parseKey();\n-\tint parseValueBlock();\n-\tint parseCameraLocation(CameraConfigData *cameraConfigData,\n-\t\t\t\tconst std::string &location);\n-\tint parseCameraConfigData(const std::string &cameraId);\n-\tint parseCameras();\n-\tint parseEntry();\n-\n-\tyaml_parser_t parser_;\n+\tint parseCameraConfigData(const std::string &cameraId, const YamlObject &);\n+\tint parseLocation(const YamlObject &, CameraConfigData &cameraConfigData);\n+\tint parseRotation(const YamlObject &, CameraConfigData &cameraConfigData);\n+\n \tstd::map<std::string, CameraConfigData> *cameras_;\n };\n \n@@ -54,290 +48,110 @@ CameraHalConfig::Private::Private()\n {\n }\n \n-std::string CameraHalConfig::Private::parseValue()\n+int CameraHalConfig::Private::parseConfigFile(FILE *fh,\n+\t\t\t\t\t      std::map<std::string, CameraConfigData> *cameras)\n {\n-\tyaml_token_t token;\n-\n-\t/* Make sure the token type is a value and get its content. */\n-\tyaml_parser_scan(&parser_, &token);\n-\tif (token.type != YAML_VALUE_TOKEN) {\n-\t\tyaml_token_delete(&token);\n-\t\treturn \"\";\n-\t}\n-\tyaml_token_delete(&token);\n-\n-\tyaml_parser_scan(&parser_, &token);\n-\tif (token.type != YAML_SCALAR_TOKEN) {\n-\t\tyaml_token_delete(&token);\n-\t\treturn \"\";\n-\t}\n-\n-\tstd::string value(reinterpret_cast<char *>(token.data.scalar.value),\n-\t\t\t  token.data.scalar.length);\n-\tyaml_token_delete(&token);\n-\n-\treturn value;\n-}\n+\t/*\n+\t * Parse the HAL properties.\n+\t *\n+\t * Each camera properties block is a list of properties associated\n+\t * with the ID (as assembled by CameraSensor::generateId()) of the\n+\t * camera they refer to.\n+\t *\n+\t * cameras:\n+\t *   \"camera0 id\":\n+\t *     location: value\n+\t *     rotation: value\n+\t *     ...\n+\t *\n+\t *   \"camera1 id\":\n+\t *     location: value\n+\t *     rotation: value\n+\t *     ...\n+\t */\n \n-std::string CameraHalConfig::Private::parseKey()\n-{\n-\tyaml_token_t token;\n+\tcameras_ = cameras;\n \n-\t/* Make sure the token type is a key and get its value. */\n-\tyaml_parser_scan(&parser_, &token);\n-\tif (token.type != YAML_SCALAR_TOKEN) {\n-\t\tyaml_token_delete(&token);\n-\t\treturn \"\";\n-\t}\n+\tstd::unique_ptr<YamlObject> root = YamlParser::parse(fh);\n+\tif (!root)\n+\t\treturn -EINVAL;\n \n-\tstd::string value(reinterpret_cast<char *>(token.data.scalar.value),\n-\t\t\t  token.data.scalar.length);\n-\tyaml_token_delete(&token);\n+\tif (!root->isDictionary())\n+\t\treturn -EINVAL;\n \n-\treturn value;\n-}\n+\t/* Parse property \"cameras\" */\n+\tif (!root->contains(\"cameras\"))\n+\t\treturn -EINVAL;\n \n-int CameraHalConfig::Private::parseValueBlock()\n-{\n-\tyaml_token_t token;\n+\tconst YamlObject &yamlObjectCameras = (*root)[\"cameras\"];\n \n-\t/* Make sure the next token are VALUE and BLOCK_MAPPING_START. */\n-\tyaml_parser_scan(&parser_, &token);\n-\tif (token.type != YAML_VALUE_TOKEN) {\n-\t\tyaml_token_delete(&token);\n+\tif (!yamlObjectCameras.isDictionary())\n \t\treturn -EINVAL;\n-\t}\n-\tyaml_token_delete(&token);\n \n-\tyaml_parser_scan(&parser_, &token);\n-\tif (token.type != YAML_BLOCK_MAPPING_START_TOKEN) {\n-\t\tyaml_token_delete(&token);\n-\t\treturn -EINVAL;\n+\tstd::vector<std::string> cameraIds = yamlObjectCameras.getMemberNames();\n+\tfor (const std::string &cameraId : cameraIds) {\n+\t\tif (parseCameraConfigData(cameraId,\n+\t\t\t\t\t  yamlObjectCameras[cameraId]))\n+\t\t\treturn -EINVAL;\n \t}\n-\tyaml_token_delete(&token);\n \n \treturn 0;\n }\n \n-int CameraHalConfig::Private::parseCameraLocation(CameraConfigData *cameraConfigData,\n-\t\t\t\t\t\t  const std::string &location)\n-{\n-\tif (location == \"front\")\n-\t\tcameraConfigData->facing = CAMERA_FACING_FRONT;\n-\telse if (location == \"back\")\n-\t\tcameraConfigData->facing = CAMERA_FACING_BACK;\n-\telse\n-\t\treturn -EINVAL;\n+int CameraHalConfig::Private::parseCameraConfigData(const std::string &cameraId,\n+\t\t\t\t\t\t    const YamlObject &cameraObject)\n \n-\treturn 0;\n-}\n-\n-int CameraHalConfig::Private::parseCameraConfigData(const std::string &cameraId)\n {\n-\tint ret = parseValueBlock();\n-\tif (ret)\n-\t\treturn ret;\n-\n-\t/*\n-\t * Parse the camera properties and store them in a cameraConfigData\n-\t * instance.\n-\t *\n-\t * Add a safety counter to make sure we don't loop indefinitely in case\n-\t * the configuration file is malformed.\n-\t */\n-\tCameraConfigData cameraConfigData;\n-\tunsigned int sentinel = 100;\n-\tbool blockEnd = false;\n-\tyaml_token_t token;\n-\n-\tdo {\n-\t\tyaml_parser_scan(&parser_, &token);\n-\t\tswitch (token.type) {\n-\t\tcase YAML_KEY_TOKEN: {\n-\t\t\tyaml_token_delete(&token);\n-\n-\t\t\t/*\n-\t\t\t * Parse the camera property key and make sure it is\n-\t\t\t * valid.\n-\t\t\t */\n-\t\t\tstd::string key = parseKey();\n-\t\t\tstd::string value = parseValue();\n-\t\t\tif (key.empty() || value.empty())\n-\t\t\t\treturn -EINVAL;\n-\n-\t\t\tif (key == \"location\") {\n-\t\t\t\tret = parseCameraLocation(&cameraConfigData, value);\n-\t\t\t\tif (ret) {\n-\t\t\t\t\tLOG(HALConfig, Error)\n-\t\t\t\t\t\t<< \"Unknown location: \" << value;\n-\t\t\t\t\treturn -EINVAL;\n-\t\t\t\t}\n-\t\t\t} else if (key == \"rotation\") {\n-\t\t\t\tret = std::stoi(value);\n-\t\t\t\tif (ret < 0 || ret >= 360) {\n-\t\t\t\t\tLOG(HALConfig, Error)\n-\t\t\t\t\t\t<< \"Unknown rotation: \" << value;\n-\t\t\t\t\treturn -EINVAL;\n-\t\t\t\t}\n-\t\t\t\tcameraConfigData.rotation = ret;\n-\t\t\t} else {\n-\t\t\t\tLOG(HALConfig, Error)\n-\t\t\t\t\t<< \"Unknown key: \" << key;\n-\t\t\t\treturn -EINVAL;\n-\t\t\t}\n-\t\t\tbreak;\n-\t\t}\n-\n-\t\tcase YAML_BLOCK_END_TOKEN:\n-\t\t\tblockEnd = true;\n-\t\t\t[[fallthrough]];\n-\t\tdefault:\n-\t\t\tyaml_token_delete(&token);\n-\t\t\tbreak;\n-\t\t}\n-\n-\t\t--sentinel;\n-\t} while (!blockEnd && sentinel);\n-\tif (!sentinel)\n+\tif (!cameraObject.isDictionary())\n \t\treturn -EINVAL;\n \n-\t(*cameras_)[cameraId] = cameraConfigData;\n-\n-\treturn 0;\n-}\n+\tCameraConfigData &cameraConfigData = (*cameras_)[cameraId];\n \n-int CameraHalConfig::Private::parseCameras()\n-{\n-\tint ret = parseValueBlock();\n-\tif (ret) {\n-\t\tLOG(HALConfig, Error) << \"Configuration file is not valid\";\n-\t\treturn ret;\n-\t}\n+\t/* Parse property \"location\" */\n+\tif (parseLocation(cameraObject, cameraConfigData))\n+\t\treturn -EINVAL;\n \n-\t/*\n-\t * Parse the camera properties.\n-\t *\n-\t * Each camera properties block is a list of properties associated\n-\t * with the ID (as assembled by CameraSensor::generateId()) of the\n-\t * camera they refer to.\n-\t *\n-\t * cameras:\n-\t *   \"camera0 id\":\n-\t *     key: value\n-\t *     key: value\n-\t *     ...\n-\t *\n-\t *   \"camera1 id\":\n-\t *     key: value\n-\t *     key: value\n-\t *     ...\n-\t */\n-\tbool blockEnd = false;\n-\tyaml_token_t token;\n-\tdo {\n-\t\tyaml_parser_scan(&parser_, &token);\n-\t\tswitch (token.type) {\n-\t\tcase YAML_KEY_TOKEN: {\n-\t\t\tyaml_token_delete(&token);\n-\n-\t\t\t/* Parse the camera ID as key of the property list. */\n-\t\t\tstd::string cameraId = parseKey();\n-\t\t\tif (cameraId.empty())\n-\t\t\t\treturn -EINVAL;\n-\n-\t\t\tret = parseCameraConfigData(cameraId);\n-\t\t\tif (ret)\n-\t\t\t\treturn -EINVAL;\n-\t\t\tbreak;\n-\t\t}\n-\t\tcase YAML_BLOCK_END_TOKEN:\n-\t\t\tblockEnd = true;\n-\t\t\t[[fallthrough]];\n-\t\tdefault:\n-\t\t\tyaml_token_delete(&token);\n-\t\t\tbreak;\n-\t\t}\n-\t} while (!blockEnd);\n+\t/* Parse property \"rotation\" */\n+\tif (parseRotation(cameraObject, cameraConfigData))\n+\t\treturn -EINVAL;\n \n \treturn 0;\n }\n \n-int CameraHalConfig::Private::parseEntry()\n+int CameraHalConfig::Private::parseLocation(const YamlObject &cameraObject,\n+\t\t\t\t\t    CameraConfigData &cameraConfigData)\n {\n-\tint ret = -EINVAL;\n+\tif (!cameraObject.contains(\"location\"))\n+\t\treturn -EINVAL;\n \n-\t/*\n-\t * Parse each key we find in the file.\n-\t *\n-\t * The 'cameras' keys maps to a list of (lists) of camera properties.\n-\t */\n+\tstd::string location = cameraObject[\"location\"].get<std::string>(\"\");\n \n-\tstd::string key = parseKey();\n-\tif (key.empty())\n-\t\treturn ret;\n-\n-\tif (key == \"cameras\")\n-\t\tret = parseCameras();\n+\tif (location == \"front\")\n+\t\tcameraConfigData.facing = CAMERA_FACING_FRONT;\n+\telse if (location == \"back\")\n+\t\tcameraConfigData.facing = CAMERA_FACING_BACK;\n \telse\n-\t\tLOG(HALConfig, Error) << \"Unknown key: \" << key;\n+\t\treturn -EINVAL;\n \n-\treturn ret;\n+\treturn 0;\n }\n \n-int CameraHalConfig::Private::parseConfigFile(FILE *fh,\n-\t\t\t\t\t      std::map<std::string, CameraConfigData> *cameras)\n+int CameraHalConfig::Private::parseRotation(const YamlObject &cameraObject,\n+\t\t\t\t\t    CameraConfigData &cameraConfigData)\n {\n-\tcameras_ = cameras;\n-\n-\tint ret = yaml_parser_initialize(&parser_);\n-\tif (!ret) {\n-\t\tLOG(HALConfig, Error) << \"Failed to initialize yaml parser\";\n-\t\treturn -EINVAL;\n-\t}\n-\tyaml_parser_set_input_file(&parser_, fh);\n-\n-\tyaml_token_t token;\n-\tyaml_parser_scan(&parser_, &token);\n-\tif (token.type != YAML_STREAM_START_TOKEN) {\n-\t\tLOG(HALConfig, Error) << \"Configuration file is not valid\";\n-\t\tyaml_token_delete(&token);\n-\t\tyaml_parser_delete(&parser_);\n+\tif (!cameraObject.contains(\"rotation\"))\n \t\treturn -EINVAL;\n-\t}\n-\tyaml_token_delete(&token);\n \n-\tyaml_parser_scan(&parser_, &token);\n-\tif (token.type != YAML_BLOCK_MAPPING_START_TOKEN) {\n-\t\tLOG(HALConfig, Error) << \"Configuration file is not valid\";\n-\t\tyaml_token_delete(&token);\n-\t\tyaml_parser_delete(&parser_);\n+\tint32_t rotation = cameraObject[\"rotation\"].get<int32_t>(-1);\n+\n+\tif (rotation < 0 || rotation >= 360) {\n+\t\tLOG(HALConfig, Error)\n+\t\t\t<< \"Unknown rotation: \" << rotation;\n \t\treturn -EINVAL;\n \t}\n-\tyaml_token_delete(&token);\n-\n-\t/* Parse the file and parse each single key one by one. */\n-\tdo {\n-\t\tyaml_parser_scan(&parser_, &token);\n-\t\tswitch (token.type) {\n-\t\tcase YAML_KEY_TOKEN:\n-\t\t\tyaml_token_delete(&token);\n-\t\t\tret = parseEntry();\n-\t\t\tbreak;\n-\n-\t\tcase YAML_STREAM_END_TOKEN:\n-\t\t\tret = -ENOENT;\n-\t\t\t[[fallthrough]];\n-\t\tdefault:\n-\t\t\tyaml_token_delete(&token);\n-\t\t\tbreak;\n-\t\t}\n-\t} while (ret >= 0);\n-\tyaml_parser_delete(&parser_);\n-\n-\tif (ret && ret != -ENOENT)\n-\t\tLOG(HALConfig, Error) << \"Configuration file is not valid\";\n-\n-\treturn ret == -ENOENT ? 0 : ret;\n+\n+\tcameraConfigData.rotation = rotation;\n+\treturn 0;\n }\n \n CameraHalConfig::CameraHalConfig()\ndiff --git a/src/android/meson.build b/src/android/meson.build\nindex 75b4bf20..1bba54de 100644\n--- a/src/android/meson.build\n+++ b/src/android/meson.build\n@@ -3,7 +3,6 @@\n android_deps = [\n     dependency('libexif', required : get_option('android')),\n     dependency('libjpeg', required : get_option('android')),\n-    dependency('yaml-0.1', required : get_option('android')),\n     libcamera_private,\n ]\n \n","prefixes":["libcamera-devel","v5","3/3"]}