[v2,0/2] libcamera: Add SensorSequence request metadata control
mbox series

Message ID 20260703224817.15650-1-ballen4705@googlemail.com
Headers show
Series
  • libcamera: Add SensorSequence request metadata control
Related show

Message

Bruce Allen July 3, 2026, 10:48 p.m. UTC
Hi,

This v2 series follows up on my v1 submission that exposed the Unicam
frontend sequence as an RPi vendor control [1], and Kieran's feedback that
this should be a standard metadata control across all platforms [2].

The series revives the approach from Kieran's 2021 RFC "Request metadata:
SensorSequence" [3], updated for the current control_ids_core.yaml layout
and additional pipelines. Compared with that original 8-patch series, this
submission is limited to the control definition, pipeline plumbing, and
application documentation (no cam/qcam/gstreamer changes).

Changes since v1:
- Define controls::SensorSequence in control_ids_core.yaml (int64_t, out)
  instead of controls::rpi::SensorSequence in control_ids_rpi.yaml
- Populate the control in every pipeline handler that already reports
  SensorTimestamp (simple, ipu3, rkisp1, rpi/vc4, rpi/pisp, mali-c55,
  imx8-isi, uvcvideo, vimc)
- Document SensorSequence in the application developer guide

Motivation (unchanged from v1): applications diagnosing frame loss need a
counter tied to sensor-side capture, not just delivered-frame or request-
queue sequence. Gaps in SensorSequence indicate frames that did not reach the
capture device stream before the previous request completed. Python bindings
follow from existing pycamera codegen.

Tested: patch applies cleanly to master @ 709ad59; builds with
-Dpipelines=rpi/vc4 -Dipas=rpi/vc4 -Dpycamera=enabled. Verified on
Raspberry Pi CM4 that monotonic SensorSequence detects dropped frames.

[1] https://lists.libcamera.org/pipermail/libcamera-devel/2026-June/059669.html
[2] https://lists.libcamera.org/pipermail/libcamera-devel/2026-June/059681.html
[3] https://patchwork.libcamera.org/project/libcamera/list/?series=2822

Cheers,
Bruce Allen