[libcamera-devel,1/8] libcamera: controls: Add SensorSequence metadata control
diff mbox series

Message ID 20211206233948.1351206-2-kieran.bingham@ideasonboard.com
State New
Delegated to: Kieran Bingham
Headers show
Series
  • Request metadata: SensorSequence
Related show

Commit Message

Kieran Bingham Dec. 6, 2021, 11:39 p.m. UTC
Provide a metadata control that allows pipeline handlers to report the
sequence number from the sensor for every request.

This can be used to monitor and validate the sequence numbers of the
captured images and detect any frame drops.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/libcamera/control_ids.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Naushir Patuck Dec. 7, 2021, 2:01 p.m. UTC | #1
Hi Kieran,

Thank you for your patch.

On Mon, 6 Dec 2021 at 23:39, Kieran Bingham <kieran.bingham@ideasonboard.com>
wrote:

> Provide a metadata control that allows pipeline handlers to report the
> sequence number from the sensor for every request.
>
> This can be used to monitor and validate the sequence numbers of the
> captured images and detect any frame drops.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  src/libcamera/control_ids.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/src/libcamera/control_ids.yaml
> b/src/libcamera/control_ids.yaml
> index 9d4638ae677e..8874fe75102c 100644
> --- a/src/libcamera/control_ids.yaml
> +++ b/src/libcamera/control_ids.yaml
> @@ -381,6 +381,14 @@ controls:
>          \todo Define how the sensor timestamp has to be used in the
> reprocessing
>          use case.
>
> +  - SensorSequence:
> +      type: int64_t
> +      description: |
> +        The monotonic sequence number from the sensor.
> +
> +        Any break in the sequence number is an indication of frame drop
> or error
> +        in the captured stream.
> +
>

Should we add that there are no guarantees about this sequence number being
reset on start/stop?

Reviewed-by: Naushir Patuck <naush@raspberrypi.com>



>    #
> ----------------------------------------------------------------------------
>    # Draft controls section
>
> --
> 2.30.2
>
>

Patch
diff mbox series

diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
index 9d4638ae677e..8874fe75102c 100644
--- a/src/libcamera/control_ids.yaml
+++ b/src/libcamera/control_ids.yaml
@@ -381,6 +381,14 @@  controls:
         \todo Define how the sensor timestamp has to be used in the reprocessing
         use case.
 
+  - SensorSequence:
+      type: int64_t
+      description: |
+        The monotonic sequence number from the sensor.
+
+        Any break in the sequence number is an indication of frame drop or error
+        in the captured stream.
+
   # ----------------------------------------------------------------------------
   # Draft controls section