[RFC PATCH v1 0/8] utils: codegen: ipc: Simplify deserialization

Barnabás Pőcze barnabas.pocze at ideasonboard.com
Thu May 15 14:00:04 CEST 2025


Proof of concept to fix https://bugs.libcamera.org/show_bug.cgi?id=269.

The first 7 are essentially non-functional changes, the main changes are
in the 8th patch. See that patch for the details.

Barnabás Pőcze (8):
  utils: codegen: ipc: Use `any()` instead of `len([]) > 0`
  utils: codegen: ipc: Remove `namespace` argument
  utils: codegen: ipc: Add `deserializer()` function
  utils: codegen: ipc: Log error code when remote call fails
  utils: codegen: ipc: Simplify `return` statements
  libcamera: ipa_data_serializer: Remove some vector `reserve()` calls
  libcamera: ipa_data_serializer: Add specialization for enums
  utils: codegen: ipc: Simplify deserialization

 .../libcamera/internal/ipa_data_serializer.h  | 215 +++--------
 include/libcamera/internal/ipc_pipe.h         |   3 +
 include/libcamera/internal/serialization.h    |  91 +++++
 src/libcamera/ipa_data_serializer.cpp         | 357 ++++--------------
 src/libcamera/ipc_pipe.cpp                    |   5 +
 test/ipc/unixsocket_ipc.cpp                   |  18 +-
 .../generated_serializer_test.cpp             |  17 +-
 .../ipa_data_serializer_test.cpp              |  32 +-
 .../core_ipa_serializer.h.tmpl                |   9 +-
 .../module_ipa_proxy.cpp.tmpl                 |  42 +--
 .../module_ipa_proxy.h.tmpl                   |   5 +-
 .../module_ipa_proxy_worker.cpp.tmpl          |   5 +-
 .../module_ipa_serializer.h.tmpl              |   9 +-
 .../libcamera_templates/proxy_functions.tmpl  | 128 +------
 .../libcamera_templates/serializer.tmpl       | 244 +-----------
 .../generators/mojom_libcamera_generator.py   |  14 +-
 16 files changed, 351 insertions(+), 843 deletions(-)
 create mode 100644 include/libcamera/internal/serialization.h

--
2.49.0


More information about the libcamera-devel mailing list