diff options
author | Paul Elder <paul.elder@ideasonboard.com> | 2020-12-05 19:30:44 +0900 |
---|---|---|
committer | Paul Elder <paul.elder@ideasonboard.com> | 2021-02-16 19:21:00 +0900 |
commit | 7832e19a599ec10eb9cf75decbe3b03d6af5364c (patch) | |
tree | e8f4d8641eca68b7ce76441d9e4a0a7edf06163e /utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl | |
parent | 892c0f4c19f2d423560a1ab4d7498130816852c3 (diff) |
utils: ipc: add templates for code generation for IPC mechanism
Add templates to mojo to generate code for the IPC mechanism. These
templates generate:
- module header
- module serializer
- IPA proxy cpp, header, and worker
Given an input data definition mojom file for a pipeline.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl')
-rw-r--r-- | utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl b/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl new file mode 100644 index 00000000..6bf6094b --- /dev/null +++ b/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl @@ -0,0 +1,40 @@ +{#- + # SPDX-License-Identifier: LGPL-2.1-or-later + # Copyright (C) 2020, Google Inc. +-#} +{%- import "definition_functions.tmpl" as funcs -%} +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2020, Google Inc. + * + * core_ipa_interface.h - libcamera core definitions for Image Processing Algorithms + * + * This file is auto-generated. Do not edit. + */ + +#ifndef __LIBCAMERA_IPA_INTERFACE_CORE_GENERATED_H__ +#define __LIBCAMERA_IPA_INTERFACE_CORE_GENERATED_H__ + +{% if has_map %}#include <map>{% endif %} +{% if has_array %}#include <vector>{% endif %} + +#include <libcamera/ipa/ipa_interface.h> + +namespace libcamera { + +{# \todo Use const char * instead of std::string for strings #} +{% for const in consts %} +static const {{const.kind|name}} {{const.mojom_name}} = {{const.value}}; +{% endfor %} + +{% for enum in enums %} +{{funcs.define_enum(enum)}} +{% endfor %} + +{%- for struct in structs_gen_header %} +{{funcs.define_struct(struct)}} +{% endfor %} + +} /* namespace libcamera */ + +#endif /* __LIBCAMERA_IPA_INTERFACE_CORE_GENERATED_H__ */ |