[RFC,v2,17/22] guides: pipeline_handler: Document PipelineHandler::metadataAvailable
diff mbox series

Message ID 20250721104622.1550908-18-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • libcamera: Add `MetadataList`
Related show

Commit Message

Barnabás Pőcze July 21, 2025, 10:46 a.m. UTC
From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Document the new available helpers to accumulate metadata results in
Request::metadata and notify applications about metadata availability.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
Original: https://patchwork.libcamera.org/patch/22230/
---
 Documentation/guides/pipeline-handler.rst | 26 ++++++++++++++++-------
 1 file changed, 18 insertions(+), 8 deletions(-)

Comments

Paul Elder Sept. 18, 2025, 11:27 a.m. UTC | #1
Quoting Barnabás Pőcze (2025-07-21 19:46:17)
> From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> 
> Document the new available helpers to accumulate metadata results in
> Request::metadata and notify applications about metadata availability.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> ---
> Original: https://patchwork.libcamera.org/patch/22230/
> ---
>  Documentation/guides/pipeline-handler.rst | 26 ++++++++++++++++-------
>  1 file changed, 18 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
> index 0d5df7269..2b5e8414d 100644
> --- a/Documentation/guides/pipeline-handler.rst
> +++ b/Documentation/guides/pipeline-handler.rst
> @@ -1425,18 +1425,28 @@ classes documentation.
>  .. _libcamera Signal and Slot: https://libcamera.org/api-html/classlibcamera_1_1Signal.html#details
>  
>  In order to notify applications about the availability of new frames and data,
> -the ``Camera`` device exposes two ``Signals`` to which applications can connect
> -to be notified of frame completion events. The ``bufferComplete`` signal serves
> -to report to applications the completion event of a single ``Stream`` part of a
> -``Request``, while the ``requestComplete`` signal notifies the completion of all
> -the ``Streams`` and data submitted as part of a request. This mechanism allows
> +the ``Camera`` device exposes three ``Signals`` to which applications can
> +connect to be notified of frame completion and metadata availability events.
> +
> +The ``metadataAvailable`` signal serves to notify about the availability of
> +metadata and accumulates metadata results in the list of metadata associated

afaiu the metadataAvailable signal does not accumulate metadata results but
rather returns only the metadata that has been newly reported since the last
time the signal was emitted for the particular Request.

> +with a ``Request``.  The ``bufferComplete`` signal serves to report to
> +applications the completion event of a single ``Stream`` part of a ``Request``,
> +while the ``requestComplete`` signal notifies the completion of all the
> +``Streams`` and data submitted as part of a request. This mechanism allows
>  implementation of partial request completion, which allows an application to
>  inspect completed buffers associated with the single streams without waiting for
>  all of them to be ready.
>  
> -The ``bufferComplete`` and ``requestComplete`` signals are emitted by the
> -``Camera`` device upon notifications received from the pipeline handler, which
> -tracks the buffers and request completion status.
> +The ``metadataAvailable``, ``bufferComplete`` and ``requestComplete`` signals
> +are emitted by the ``Camera`` device upon notifications received from the
> +pipeline handler, which tracks the metadata, buffers and request completion
> +status.
> +
> +Metadata availability is signalled by the pipeline handlers by calling the
> +PipelineHandler base class ``metadataAvailable`` function. This function
> +notifies applications about metadata availability and accumulates metadata
> +results in the ``Request::metadata()`` list.

Here it's fine since this describes the metadataAvailable helper function, and
matches my understanding of what it does.


Paul

>  
>  The single buffer completion notification is implemented by pipeline handlers by
>  `connecting`_ the ``bufferReady`` signal of the capture devices they have queued
> -- 
> 2.50.1
>

Patch
diff mbox series

diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
index 0d5df7269..2b5e8414d 100644
--- a/Documentation/guides/pipeline-handler.rst
+++ b/Documentation/guides/pipeline-handler.rst
@@ -1425,18 +1425,28 @@  classes documentation.
 .. _libcamera Signal and Slot: https://libcamera.org/api-html/classlibcamera_1_1Signal.html#details
 
 In order to notify applications about the availability of new frames and data,
-the ``Camera`` device exposes two ``Signals`` to which applications can connect
-to be notified of frame completion events. The ``bufferComplete`` signal serves
-to report to applications the completion event of a single ``Stream`` part of a
-``Request``, while the ``requestComplete`` signal notifies the completion of all
-the ``Streams`` and data submitted as part of a request. This mechanism allows
+the ``Camera`` device exposes three ``Signals`` to which applications can
+connect to be notified of frame completion and metadata availability events.
+
+The ``metadataAvailable`` signal serves to notify about the availability of
+metadata and accumulates metadata results in the list of metadata associated
+with a ``Request``.  The ``bufferComplete`` signal serves to report to
+applications the completion event of a single ``Stream`` part of a ``Request``,
+while the ``requestComplete`` signal notifies the completion of all the
+``Streams`` and data submitted as part of a request. This mechanism allows
 implementation of partial request completion, which allows an application to
 inspect completed buffers associated with the single streams without waiting for
 all of them to be ready.
 
-The ``bufferComplete`` and ``requestComplete`` signals are emitted by the
-``Camera`` device upon notifications received from the pipeline handler, which
-tracks the buffers and request completion status.
+The ``metadataAvailable``, ``bufferComplete`` and ``requestComplete`` signals
+are emitted by the ``Camera`` device upon notifications received from the
+pipeline handler, which tracks the metadata, buffers and request completion
+status.
+
+Metadata availability is signalled by the pipeline handlers by calling the
+PipelineHandler base class ``metadataAvailable`` function. This function
+notifies applications about metadata availability and accumulates metadata
+results in the ``Request::metadata()`` list.
 
 The single buffer completion notification is implemented by pipeline handlers by
 `connecting`_ the ``bufferReady`` signal of the capture devices they have queued