[{"id":16491,"web_url":"https://patchwork.libcamera.org/comment/16491/","msgid":"<1acfce39-03a3-0a0b-bb7e-89891d8bd590@ideasonboard.com>","date":"2021-04-22T06:44:51","subject":"Re: [libcamera-devel] [PATCH] utils: ipc: Support types defined in\n\tcore.mojom with skipHeader only","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Paul\n\nThanks for the patch, I had a chance to test it this morning and it does \nsolve the `Size` errors.\n\nHowever, if I try to wrap CameraSensorInfo, there is a compile time error:\nIn file included from src/libcamera/proxy/ipu3_ipa_proxy.cpp:10:\nIn file included from include/libcamera/ipa/ipu3_ipa_proxy.h:14:\ninclude/libcamera/ipa/ipu3_ipa_interface.h:101:19: error: field has \nincomplete type 'libcamera::CameraSensorInfo'\n         CameraSensorInfo sensorInfo;\n                          ^\n../../../../../tmp/portage/media-libs/libcamera-9999/work/libcamera-9999/include/libcamera/ipa/ipa_interface.h:28:8: \nnote: forward declaration of 'libcamera::CameraSensorInfo'\nstruct CameraSensorInfo;\n        ^\n1 error generated.\n\nIs that something you are aware of? The only difference(with my limited \nknowledge about mojom) I can spot is `Size` comes from a header whereas \nCameraSensorInfo if forward-declared in ipa_interface.h\n\nI have pushed a branch which can help you reproduce the issue on a ipu3 \ndevice - https://github.com/uajain/libcamera/commits/uajain/mojom-namespace\nFull build log : https://paste.gnome.org/pror88r8t\n\nPlease let me know if you need anything else, from my end.\n\n\nOn 4/21/21 3:56 PM, Paul Elder wrote:\n> Previously, types that were defined in core.mojom with skipHeader only\n> and no skipSerdes would cause serializer generation to fail due to the\n> generated IPA namespace being used for mojom-defined types instead of\n> the libcamera namespace. This doesn't work because skipHeader means that\n> the type is defined in the libcamera (or some other) namespace\n> elsewhere.\n>\n> Fix this by using \"using namespace\" in the generated serializer header,\n> so that mojom-defined IPA types can be used without the full namespace\n> qualifier.\n>\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>   .../module_ipa_serializer.h.tmpl              |  6 +++\n>   .../libcamera_templates/serializer.tmpl       | 38 +++++++++----------\n>   2 files changed, 24 insertions(+), 20 deletions(-)\n>\n> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_serializer.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_serializer.h.tmpl\n> index 64ae99dc..d0bac62d 100644\n> --- a/utils/ipc/generators/libcamera_templates/module_ipa_serializer.h.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_serializer.h.tmpl\n> @@ -27,6 +27,12 @@\n>   \n>   namespace libcamera {\n>   \n> +{%- if has_namespace %}\n> +{% for ns in namespace -%}\n> +using namespace {{ns}};\n> +{% endfor %}\n> +{%- endif %}\n> +\n>   LOG_DECLARE_CATEGORY(IPADataSerializer)\n>   {% for struct in structs_nonempty %}\n>   template<>\n> diff --git a/utils/ipc/generators/libcamera_templates/serializer.tmpl b/utils/ipc/generators/libcamera_templates/serializer.tmpl\n> index af35b9e3..afabd8e3 100644\n> --- a/utils/ipc/generators/libcamera_templates/serializer.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/serializer.tmpl\n> @@ -63,12 +63,10 @@\n>   \t{%- else %}\n>   \t\tstd::tie({{field.mojom_name}}, std::ignore) =\n>   \t{%- endif %}\n> -\t{%- if field|is_array or field|is_map %}\n> -\t\t\tIPADataSerializer<{{field|name}}>::serialize(data.{{field.mojom_name}}, cs);\n> -\t{%- elif field|is_str %}\n> +\t{%- if field|is_str %}\n>   \t\t\tIPADataSerializer<{{field|name}}>::serialize(data.{{field.mojom_name}});\n>   \t{%- else %}\n> -\t\t\tIPADataSerializer<{{field|name_full(namespace)}}>::serialize(data.{{field.mojom_name}}, cs);\n> +\t\t\tIPADataSerializer<{{field|name}}>::serialize(data.{{field.mojom_name}}, cs);\n>   \t{%- endif %}\n>   \t\tappendPOD<uint32_t>(retData, {{field.mojom_name}}.size());\n>   \t{%- if field|has_fd %}\n> @@ -97,7 +95,7 @@\n>   \t\t{%- if field|is_pod %}\n>   \t\tret.{{field.mojom_name}} = IPADataSerializer<{{field|name}}>::deserialize(m, m + {{field_size}});\n>   \t\t{%- else %}\n> -\t\tret.{{field.mojom_name}} = static_cast<{{field|name_full(namespace)}}>(IPADataSerializer<uint{{field|bit_width}}_t>::deserialize(m, m + {{field_size}}));\n> +\t\tret.{{field.mojom_name}} = static_cast<{{field|name}}>(IPADataSerializer<uint{{field|bit_width}}_t>::deserialize(m, m + {{field_size}}));\n>   \t\t{%- endif %}\n>   \t{%- if not loop.last %}\n>   \t\tm += {{field_size}};\n> @@ -150,11 +148,11 @@\n>   \t{%- elif field|has_fd and (field|is_array or field|is_map) %}\n>   \t\t\tIPADataSerializer<{{field|name}}>::deserialize(m, m + {{field.mojom_name}}Size, n, n + {{field.mojom_name}}FdsSize, cs);\n>   \t{%- elif field|has_fd and (not (field|is_array or field|is_map)) %}\n> -\t\t\tIPADataSerializer<{{field|name_full(namespace)}}>::deserialize(m, m + {{field.mojom_name}}Size, n, n + {{field.mojom_name}}FdsSize, cs);\n> +\t\t\tIPADataSerializer<{{field|name}}>::deserialize(m, m + {{field.mojom_name}}Size, n, n + {{field.mojom_name}}FdsSize, cs);\n>   \t{%- elif (not field|has_fd) and (field|is_array or field|is_map) %}\n>   \t\t\tIPADataSerializer<{{field|name}}>::deserialize(m, m + {{field.mojom_name}}Size, cs);\n>   \t{%- else %}\n> -\t\t\tIPADataSerializer<{{field|name_full(namespace)}}>::deserialize(m, m + {{field.mojom_name}}Size, cs);\n> +\t\t\tIPADataSerializer<{{field|name}}>::deserialize(m, m + {{field.mojom_name}}Size, cs);\n>   \t{%- endif %}\n>   \t{%- if not loop.last %}\n>   \t\tm += {{field_size}};\n> @@ -178,7 +176,7 @@\n>    #}\n>   {%- macro serializer(struct, namespace) %}\n>   \tstatic std::tuple<std::vector<uint8_t>, std::vector<int32_t>>\n> -\tserialize(const {{struct|name_full(namespace)}} &data,\n> +\tserialize(const {{struct|name}} &data,\n>   {%- if struct|needs_control_serializer %}\n>   \t\t  ControlSerializer *cs)\n>   {%- else %}\n> @@ -208,7 +206,7 @@\n>    # \\a struct, in the case that \\a struct has file descriptors.\n>    #}\n>   {%- macro deserializer_fd(struct, namespace) %}\n> -\tstatic {{struct|name_full(namespace)}}\n> +\tstatic {{struct|name}}\n>   \tdeserialize(std::vector<uint8_t> &data,\n>   \t\t    std::vector<int32_t> &fds,\n>   {%- if struct|needs_control_serializer %}\n> @@ -217,11 +215,11 @@\n>   \t\t    ControlSerializer *cs = nullptr)\n>   {%- endif %}\n>   \t{\n> -\t\treturn IPADataSerializer<{{struct|name_full(namespace)}}>::deserialize(data.cbegin(), data.cend(), fds.cbegin(), fds.cend(), cs);\n> +\t\treturn IPADataSerializer<{{struct|name}}>::deserialize(data.cbegin(), data.cend(), fds.cbegin(), fds.cend(), cs);\n>   \t}\n>   \n>   {# \\todo Don't inline this function #}\n> -\tstatic {{struct|name_full(namespace)}}\n> +\tstatic {{struct|name}}\n>   \tdeserialize(std::vector<uint8_t>::const_iterator dataBegin,\n>   \t\t    std::vector<uint8_t>::const_iterator dataEnd,\n>   \t\t    std::vector<int32_t>::const_iterator fdsBegin,\n> @@ -232,7 +230,7 @@\n>   \t\t    [[maybe_unused]] ControlSerializer *cs = nullptr)\n>   {%- endif %}\n>   \t{\n> -\t\t{{struct|name_full(namespace)}} ret;\n> +\t\t{{struct|name}} ret;\n>   \t\tstd::vector<uint8_t>::const_iterator m = dataBegin;\n>   \t\tstd::vector<int32_t>::const_iterator n = fdsBegin;\n>   \n> @@ -253,22 +251,22 @@\n>    # deserializers with file descriptors.\n>    #}\n>   {%- macro deserializer_fd_simple(struct, namespace) %}\n> -\tstatic {{struct|name_full(namespace)}}\n> +\tstatic {{struct|name}}\n>   \tdeserialize(std::vector<uint8_t> &data,\n>   \t\t    [[maybe_unused]] std::vector<int32_t> &fds,\n>   \t\t    ControlSerializer *cs = nullptr)\n>   \t{\n> -\t\treturn IPADataSerializer<{{struct|name_full(namespace)}}>::deserialize(data.cbegin(), data.cend(), cs);\n> +\t\treturn IPADataSerializer<{{struct|name}}>::deserialize(data.cbegin(), data.cend(), cs);\n>   \t}\n>   \n> -\tstatic {{struct|name_full(namespace)}}\n> +\tstatic {{struct|name}}\n>   \tdeserialize(std::vector<uint8_t>::const_iterator dataBegin,\n>   \t\t    std::vector<uint8_t>::const_iterator dataEnd,\n>   \t\t    [[maybe_unused]] std::vector<int32_t>::const_iterator fdsBegin,\n>   \t\t    [[maybe_unused]] std::vector<int32_t>::const_iterator fdsEnd,\n>   \t\t    ControlSerializer *cs = nullptr)\n>   \t{\n> -\t\treturn IPADataSerializer<{{struct|name_full(namespace)}}>::deserialize(dataBegin, dataEnd, cs);\n> +\t\treturn IPADataSerializer<{{struct|name}}>::deserialize(dataBegin, dataEnd, cs);\n>   \t}\n>   {%- endmacro %}\n>   \n> @@ -280,7 +278,7 @@\n>    # \\a struct, in the case that \\a struct does not have file descriptors.\n>    #}\n>   {%- macro deserializer_no_fd(struct, namespace) %}\n> -\tstatic {{struct|name_full(namespace)}}\n> +\tstatic {{struct|name}}\n>   \tdeserialize(std::vector<uint8_t> &data,\n>   {%- if struct|needs_control_serializer %}\n>   \t\t    ControlSerializer *cs)\n> @@ -288,11 +286,11 @@\n>   \t\t    ControlSerializer *cs = nullptr)\n>   {%- endif %}\n>   \t{\n> -\t\treturn IPADataSerializer<{{struct|name_full(namespace)}}>::deserialize(data.cbegin(), data.cend(), cs);\n> +\t\treturn IPADataSerializer<{{struct|name}}>::deserialize(data.cbegin(), data.cend(), cs);\n>   \t}\n>   \n>   {# \\todo Don't inline this function #}\n> -\tstatic {{struct|name_full(namespace)}}\n> +\tstatic {{struct|name}}\n>   \tdeserialize(std::vector<uint8_t>::const_iterator dataBegin,\n>   \t\t    std::vector<uint8_t>::const_iterator dataEnd,\n>   {%- if struct|needs_control_serializer %}\n> @@ -301,7 +299,7 @@\n>   \t\t    [[maybe_unused]] ControlSerializer *cs = nullptr)\n>   {%- endif %}\n>   \t{\n> -\t\t{{struct|name_full(namespace)}} ret;\n> +\t\t{{struct|name}} ret;\n>   \t\tstd::vector<uint8_t>::const_iterator m = dataBegin;\n>   \n>   \t\tsize_t dataSize = std::distance(dataBegin, dataEnd);","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 36D65BDB17\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Apr 2021 06:45:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A62E068854;\n\tThu, 22 Apr 2021 08:44:59 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id ABB7E68847\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Apr 2021 08:44:58 +0200 (CEST)","from localhost.localdomain (unknown [103.251.226.21])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 73ADE3EE;\n\tThu, 22 Apr 2021 08:44:57 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"GAvPK/UF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1619073898;\n\tbh=1CC17MbJuNtEdjq0q5lArfVkrshwk/47h7Kfhjljdq0=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=GAvPK/UF8f8Glq3+vS4dx2wDIEXw/RgXsjFcQahNLPzdvg5jPPn/7sdObhiA1Luh/\n\t1eLqxSevnrmm0UrPPsAJ+7TssADkhqP00k0E6wiE/tHerZ8+zt7ygdMS76pG1E/WiM\n\t/I9tK6NqRgNGS4s/cge6Ue9cRoqik4KQpPa/sY/Q=","To":"Paul Elder <paul.elder@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210421102647.344784-1-paul.elder@ideasonboard.com>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<1acfce39-03a3-0a0b-bb7e-89891d8bd590@ideasonboard.com>","Date":"Thu, 22 Apr 2021 12:14:51 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.11.0","MIME-Version":"1.0","In-Reply-To":"<20210421102647.344784-1-paul.elder@ideasonboard.com>","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH] utils: ipc: Support types defined in\n\tcore.mojom with skipHeader only","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>","Content-Transfer-Encoding":"base64","Content-Type":"text/plain; charset=\"utf-8\"; Format=\"flowed\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16505,"web_url":"https://patchwork.libcamera.org/comment/16505/","msgid":"<YIEvMknEtBgwUg46@pendragon.ideasonboard.com>","date":"2021-04-22T08:09:22","subject":"Re: [libcamera-devel] [PATCH] utils: ipc: Support types defined in\n\tcore.mojom with skipHeader only","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Wed, Apr 21, 2021 at 07:26:47PM +0900, Paul Elder wrote:\n> Previously, types that were defined in core.mojom with skipHeader only\n> and no skipSerdes would cause serializer generation to fail due to the\n> generated IPA namespace being used for mojom-defined types instead of\n> the libcamera namespace. This doesn't work because skipHeader means that\n> the type is defined in the libcamera (or some other) namespace\n> elsewhere.\n> \n> Fix this by using \"using namespace\" in the generated serializer header,\n> so that mojom-defined IPA types can be used without the full namespace\n> qualifier.\n\nI'm always quite cautious about using directives, especially in headers,\nas they can lead to namespace clashes. In .cpp files it's less of an\nissue, as you're in full control of what you include.\n\nDo you think it would be possible to find a solution that avoids the\nusing directive ?\n\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  .../module_ipa_serializer.h.tmpl              |  6 +++\n>  .../libcamera_templates/serializer.tmpl       | 38 +++++++++----------\n>  2 files changed, 24 insertions(+), 20 deletions(-)\n> \n> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_serializer.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_serializer.h.tmpl\n> index 64ae99dc..d0bac62d 100644\n> --- a/utils/ipc/generators/libcamera_templates/module_ipa_serializer.h.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_serializer.h.tmpl\n> @@ -27,6 +27,12 @@\n>  \n>  namespace libcamera {\n>  \n> +{%- if has_namespace %}\n> +{% for ns in namespace -%}\n> +using namespace {{ns}};\n> +{% endfor %}\n> +{%- endif %}\n> +\n>  LOG_DECLARE_CATEGORY(IPADataSerializer)\n>  {% for struct in structs_nonempty %}\n>  template<>\n> diff --git a/utils/ipc/generators/libcamera_templates/serializer.tmpl b/utils/ipc/generators/libcamera_templates/serializer.tmpl\n> index af35b9e3..afabd8e3 100644\n> --- a/utils/ipc/generators/libcamera_templates/serializer.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/serializer.tmpl\n> @@ -63,12 +63,10 @@\n>  \t{%- else %}\n>  \t\tstd::tie({{field.mojom_name}}, std::ignore) =\n>  \t{%- endif %}\n> -\t{%- if field|is_array or field|is_map %}\n> -\t\t\tIPADataSerializer<{{field|name}}>::serialize(data.{{field.mojom_name}}, cs);\n> -\t{%- elif field|is_str %}\n> +\t{%- if field|is_str %}\n>  \t\t\tIPADataSerializer<{{field|name}}>::serialize(data.{{field.mojom_name}});\n>  \t{%- else %}\n> -\t\t\tIPADataSerializer<{{field|name_full(namespace)}}>::serialize(data.{{field.mojom_name}}, cs);\n> +\t\t\tIPADataSerializer<{{field|name}}>::serialize(data.{{field.mojom_name}}, cs);\n>  \t{%- endif %}\n>  \t\tappendPOD<uint32_t>(retData, {{field.mojom_name}}.size());\n>  \t{%- if field|has_fd %}\n> @@ -97,7 +95,7 @@\n>  \t\t{%- if field|is_pod %}\n>  \t\tret.{{field.mojom_name}} = IPADataSerializer<{{field|name}}>::deserialize(m, m + {{field_size}});\n>  \t\t{%- else %}\n> -\t\tret.{{field.mojom_name}} = static_cast<{{field|name_full(namespace)}}>(IPADataSerializer<uint{{field|bit_width}}_t>::deserialize(m, m + {{field_size}}));\n> +\t\tret.{{field.mojom_name}} = static_cast<{{field|name}}>(IPADataSerializer<uint{{field|bit_width}}_t>::deserialize(m, m + {{field_size}}));\n>  \t\t{%- endif %}\n>  \t{%- if not loop.last %}\n>  \t\tm += {{field_size}};\n> @@ -150,11 +148,11 @@\n>  \t{%- elif field|has_fd and (field|is_array or field|is_map) %}\n>  \t\t\tIPADataSerializer<{{field|name}}>::deserialize(m, m + {{field.mojom_name}}Size, n, n + {{field.mojom_name}}FdsSize, cs);\n>  \t{%- elif field|has_fd and (not (field|is_array or field|is_map)) %}\n> -\t\t\tIPADataSerializer<{{field|name_full(namespace)}}>::deserialize(m, m + {{field.mojom_name}}Size, n, n + {{field.mojom_name}}FdsSize, cs);\n> +\t\t\tIPADataSerializer<{{field|name}}>::deserialize(m, m + {{field.mojom_name}}Size, n, n + {{field.mojom_name}}FdsSize, cs);\n>  \t{%- elif (not field|has_fd) and (field|is_array or field|is_map) %}\n>  \t\t\tIPADataSerializer<{{field|name}}>::deserialize(m, m + {{field.mojom_name}}Size, cs);\n>  \t{%- else %}\n> -\t\t\tIPADataSerializer<{{field|name_full(namespace)}}>::deserialize(m, m + {{field.mojom_name}}Size, cs);\n> +\t\t\tIPADataSerializer<{{field|name}}>::deserialize(m, m + {{field.mojom_name}}Size, cs);\n>  \t{%- endif %}\n>  \t{%- if not loop.last %}\n>  \t\tm += {{field_size}};\n> @@ -178,7 +176,7 @@\n>   #}\n>  {%- macro serializer(struct, namespace) %}\n>  \tstatic std::tuple<std::vector<uint8_t>, std::vector<int32_t>>\n> -\tserialize(const {{struct|name_full(namespace)}} &data,\n> +\tserialize(const {{struct|name}} &data,\n>  {%- if struct|needs_control_serializer %}\n>  \t\t  ControlSerializer *cs)\n>  {%- else %}\n> @@ -208,7 +206,7 @@\n>   # \\a struct, in the case that \\a struct has file descriptors.\n>   #}\n>  {%- macro deserializer_fd(struct, namespace) %}\n> -\tstatic {{struct|name_full(namespace)}}\n> +\tstatic {{struct|name}}\n>  \tdeserialize(std::vector<uint8_t> &data,\n>  \t\t    std::vector<int32_t> &fds,\n>  {%- if struct|needs_control_serializer %}\n> @@ -217,11 +215,11 @@\n>  \t\t    ControlSerializer *cs = nullptr)\n>  {%- endif %}\n>  \t{\n> -\t\treturn IPADataSerializer<{{struct|name_full(namespace)}}>::deserialize(data.cbegin(), data.cend(), fds.cbegin(), fds.cend(), cs);\n> +\t\treturn IPADataSerializer<{{struct|name}}>::deserialize(data.cbegin(), data.cend(), fds.cbegin(), fds.cend(), cs);\n>  \t}\n>  \n>  {# \\todo Don't inline this function #}\n> -\tstatic {{struct|name_full(namespace)}}\n> +\tstatic {{struct|name}}\n>  \tdeserialize(std::vector<uint8_t>::const_iterator dataBegin,\n>  \t\t    std::vector<uint8_t>::const_iterator dataEnd,\n>  \t\t    std::vector<int32_t>::const_iterator fdsBegin,\n> @@ -232,7 +230,7 @@\n>  \t\t    [[maybe_unused]] ControlSerializer *cs = nullptr)\n>  {%- endif %}\n>  \t{\n> -\t\t{{struct|name_full(namespace)}} ret;\n> +\t\t{{struct|name}} ret;\n>  \t\tstd::vector<uint8_t>::const_iterator m = dataBegin;\n>  \t\tstd::vector<int32_t>::const_iterator n = fdsBegin;\n>  \n> @@ -253,22 +251,22 @@\n>   # deserializers with file descriptors.\n>   #}\n>  {%- macro deserializer_fd_simple(struct, namespace) %}\n> -\tstatic {{struct|name_full(namespace)}}\n> +\tstatic {{struct|name}}\n>  \tdeserialize(std::vector<uint8_t> &data,\n>  \t\t    [[maybe_unused]] std::vector<int32_t> &fds,\n>  \t\t    ControlSerializer *cs = nullptr)\n>  \t{\n> -\t\treturn IPADataSerializer<{{struct|name_full(namespace)}}>::deserialize(data.cbegin(), data.cend(), cs);\n> +\t\treturn IPADataSerializer<{{struct|name}}>::deserialize(data.cbegin(), data.cend(), cs);\n>  \t}\n>  \n> -\tstatic {{struct|name_full(namespace)}}\n> +\tstatic {{struct|name}}\n>  \tdeserialize(std::vector<uint8_t>::const_iterator dataBegin,\n>  \t\t    std::vector<uint8_t>::const_iterator dataEnd,\n>  \t\t    [[maybe_unused]] std::vector<int32_t>::const_iterator fdsBegin,\n>  \t\t    [[maybe_unused]] std::vector<int32_t>::const_iterator fdsEnd,\n>  \t\t    ControlSerializer *cs = nullptr)\n>  \t{\n> -\t\treturn IPADataSerializer<{{struct|name_full(namespace)}}>::deserialize(dataBegin, dataEnd, cs);\n> +\t\treturn IPADataSerializer<{{struct|name}}>::deserialize(dataBegin, dataEnd, cs);\n>  \t}\n>  {%- endmacro %}\n>  \n> @@ -280,7 +278,7 @@\n>   # \\a struct, in the case that \\a struct does not have file descriptors.\n>   #}\n>  {%- macro deserializer_no_fd(struct, namespace) %}\n> -\tstatic {{struct|name_full(namespace)}}\n> +\tstatic {{struct|name}}\n>  \tdeserialize(std::vector<uint8_t> &data,\n>  {%- if struct|needs_control_serializer %}\n>  \t\t    ControlSerializer *cs)\n> @@ -288,11 +286,11 @@\n>  \t\t    ControlSerializer *cs = nullptr)\n>  {%- endif %}\n>  \t{\n> -\t\treturn IPADataSerializer<{{struct|name_full(namespace)}}>::deserialize(data.cbegin(), data.cend(), cs);\n> +\t\treturn IPADataSerializer<{{struct|name}}>::deserialize(data.cbegin(), data.cend(), cs);\n>  \t}\n>  \n>  {# \\todo Don't inline this function #}\n> -\tstatic {{struct|name_full(namespace)}}\n> +\tstatic {{struct|name}}\n>  \tdeserialize(std::vector<uint8_t>::const_iterator dataBegin,\n>  \t\t    std::vector<uint8_t>::const_iterator dataEnd,\n>  {%- if struct|needs_control_serializer %}\n> @@ -301,7 +299,7 @@\n>  \t\t    [[maybe_unused]] ControlSerializer *cs = nullptr)\n>  {%- endif %}\n>  \t{\n> -\t\t{{struct|name_full(namespace)}} ret;\n> +\t\t{{struct|name}} ret;\n>  \t\tstd::vector<uint8_t>::const_iterator m = dataBegin;\n>  \n>  \t\tsize_t dataSize = std::distance(dataBegin, dataEnd);","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 28859BDB17\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Apr 2021 08:09:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D53DA68852;\n\tThu, 22 Apr 2021 10:09:28 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1EDAD68848\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Apr 2021 10:09:27 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B27833EE;\n\tThu, 22 Apr 2021 10:09:26 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"l92XpIan\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1619078966;\n\tbh=lDaCY37B832XvM1Tj65EnNr12CgNQIR9gLoIuCs5SdU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=l92XpIandFniyYWuLsSTQRvpeWYdDwsd5tPJJ/P7y4TOYdOE1cwJJChW1gh/LT5Ub\n\tJUYSYh9VOqa0uByx7UbSg4Woxh7aAb506LuG9VJUa/HrHMg1f+vRaLhwLEBhyKuc9e\n\tXkN/7JDgoBHtfrH8Etn2gPYVrl082Xy47tP99Z2A=","Date":"Thu, 22 Apr 2021 11:09:22 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<YIEvMknEtBgwUg46@pendragon.ideasonboard.com>","References":"<20210421102647.344784-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210421102647.344784-1-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] utils: ipc: Support types defined in\n\tcore.mojom with skipHeader only","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]