[libcamera-devel] [PATCH v3 3/3] ipa: mojom: Put core.mojom in the libcamera namespace
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Apr 26 01:36:25 CEST 2021
Hi Paul,
Thank you for the patch.
On Fri, Apr 23, 2021 at 07:47:11PM +0900, Paul Elder wrote:
> Put core.mojom in the libcamera namespace, as all structs that are
> defined in core.mojom are meant to be in that namespace. Fix the structs
> that are used in the other mojom files accordingly.
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
It's much more explicit this way, nice !
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
I wonder if core.mojom should be renamed to libcamera.mojom on top of
this.
> ---
> New in v3
> ---
> include/libcamera/ipa/core.mojom | 2 ++
> include/libcamera/ipa/ipu3.mojom | 11 +++++-----
> include/libcamera/ipa/raspberrypi.mojom | 29 +++++++++++++------------
> include/libcamera/ipa/rkisp1.mojom | 13 ++++++-----
> include/libcamera/ipa/vimc.mojom | 2 +-
> 5 files changed, 31 insertions(+), 26 deletions(-)
>
> diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom
> index 70de71ea..6caaa63e 100644
> --- a/include/libcamera/ipa/core.mojom
> +++ b/include/libcamera/ipa/core.mojom
> @@ -1,5 +1,7 @@
> /* SPDX-License-Identifier: LGPL-2.1-or-later */
>
> +module libcamera;
> +
> /*
> * Things that can be defined here (and in other mojom files):
> * - consts
> diff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom
> index 5d13e7ea..a717b1e6 100644
> --- a/include/libcamera/ipa/ipu3.mojom
> +++ b/include/libcamera/ipa/ipu3.mojom
> @@ -17,22 +17,23 @@ struct IPU3Event {
> IPU3Operations op;
> uint32 frame;
> uint32 bufferId;
> - ControlList controls;
> + libcamera.ControlList controls;
> };
>
> struct IPU3Action {
> IPU3Operations op;
> - ControlList controls;
> + libcamera.ControlList controls;
> };
>
> interface IPAIPU3Interface {
> - init(IPASettings settings) => (int32 ret);
> + init(libcamera.IPASettings settings) => (int32 ret);
> start() => (int32 ret);
> stop();
>
> - configure(map<uint32, ControlInfoMap> entityControls, Size bdsOutputSize) => ();
> + configure(map<uint32, libcamera.ControlInfoMap> entityControls,
> + libcamera.Size bdsOutputSize) => ();
>
> - mapBuffers(array<IPABuffer> buffers);
> + mapBuffers(array<libcamera.IPABuffer> buffers);
> unmapBuffers(array<uint32> ids);
>
> [async] processEvent(IPU3Event ev);
> diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom
> index f38c2261..42321bee 100644
> --- a/include/libcamera/ipa/raspberrypi.mojom
> +++ b/include/libcamera/ipa/raspberrypi.mojom
> @@ -26,22 +26,23 @@ struct ISPConfig {
> uint32 embeddedBufferId;
> uint32 bayerBufferId;
> bool embeddedBufferPresent;
> - ControlList controls;
> + libcamera.ControlList controls;
> };
>
> struct IPAConfig {
> uint32 transform;
> - FileDescriptor lsTableHandle;
> + libcamera.FileDescriptor lsTableHandle;
> };
>
> struct StartConfig {
> - ControlList controls;
> + libcamera.ControlList controls;
> int32 dropFrameCount;
> };
>
> interface IPARPiInterface {
> - init(IPASettings settings) => (int32 ret, SensorConfig sensorConfig);
> - start(ControlList controls) => (StartConfig startConfig);
> + init(libcamera.IPASettings settings)
> + => (int32 ret, SensorConfig sensorConfig);
> + start(libcamera.ControlList controls) => (StartConfig startConfig);
> stop();
>
> /**
> @@ -62,11 +63,11 @@ interface IPARPiInterface {
> * The \a ipaConfig and \a controls parameters carry data passed by the
> * pipeline handler to the IPA and back.
> */
> - configure(CameraSensorInfo sensorInfo,
> - map<uint32, IPAStream> streamConfig,
> - map<uint32, ControlInfoMap> entityControls,
> + configure(libcamera.CameraSensorInfo sensorInfo,
> + map<uint32, libcamera.IPAStream> streamConfig,
> + map<uint32, libcamera.ControlInfoMap> entityControls,
> IPAConfig ipaConfig)
> - => (int32 ret, ControlList controls);
> + => (int32 ret, libcamera.ControlList controls);
>
> /**
> * \fn mapBuffers()
> @@ -94,7 +95,7 @@ interface IPARPiInterface {
> *
> * \sa unmapBuffers()
> */
> - mapBuffers(array<IPABuffer> buffers);
> + mapBuffers(array<libcamera.IPABuffer> buffers);
>
> /**
> * \fn unmapBuffers()
> @@ -109,14 +110,14 @@ interface IPARPiInterface {
> unmapBuffers(array<uint32> ids);
>
> [async] signalStatReady(uint32 bufferId);
> - [async] signalQueueRequest(ControlList controls);
> + [async] signalQueueRequest(libcamera.ControlList controls);
> [async] signalIspPrepare(ISPConfig data);
> };
>
> interface IPARPiEventInterface {
> - statsMetadataComplete(uint32 bufferId, ControlList controls);
> + statsMetadataComplete(uint32 bufferId, libcamera.ControlList controls);
> runIsp(uint32 bufferId);
> embeddedComplete(uint32 bufferId);
> - setIspControls(ControlList controls);
> - setDelayedControls(ControlList controls);
> + setIspControls(libcamera.ControlList controls);
> + setDelayedControls(libcamera.ControlList controls);
> };
> diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom
> index 29f726e1..cca871a0 100644
> --- a/include/libcamera/ipa/rkisp1.mojom
> +++ b/include/libcamera/ipa/rkisp1.mojom
> @@ -16,12 +16,12 @@ struct RkISP1Event {
> RkISP1Operations op;
> uint32 frame;
> uint32 bufferId;
> - ControlList controls;
> + libcamera.ControlList controls;
> };
>
> struct RkISP1Action {
> RkISP1Operations op;
> - ControlList controls;
> + libcamera.ControlList controls;
> };
>
> interface IPARkISP1Interface {
> @@ -29,11 +29,12 @@ interface IPARkISP1Interface {
> start() => (int32 ret);
> stop();
>
> - configure(CameraSensorInfo sensorInfo,
> - map<uint32, IPAStream> streamConfig,
> - map<uint32, ControlInfoMap> entityControls) => (int32 ret);
> + configure(libcamera.CameraSensorInfo sensorInfo,
> + map<uint32, libcamera.IPAStream> streamConfig,
> + map<uint32, libcamera.ControlInfoMap> entityControls)
> + => (int32 ret);
>
> - mapBuffers(array<IPABuffer> buffers);
> + mapBuffers(array<libcamera.IPABuffer> buffers);
> unmapBuffers(array<uint32> ids);
>
> [async] processEvent(RkISP1Event ev);
> diff --git a/include/libcamera/ipa/vimc.mojom b/include/libcamera/ipa/vimc.mojom
> index 165d9401..be4b85b8 100644
> --- a/include/libcamera/ipa/vimc.mojom
> +++ b/include/libcamera/ipa/vimc.mojom
> @@ -14,7 +14,7 @@ enum IPAOperationCode {
> };
>
> interface IPAVimcInterface {
> - init(IPASettings settings) => (int32 ret);
> + init(libcamera.IPASettings settings) => (int32 ret);
> start() => (int32 ret);
> stop();
> };
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list