From patchwork Fri Jun 26 00:37:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Allen X-Patchwork-Id: 27039 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 66E69C3301 for ; Fri, 26 Jun 2026 00:37:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F2812658D9; Fri, 26 Jun 2026 02:37:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.b="X1I7OVhf"; dkim-atps=neutral Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D4E50658D4 for ; Fri, 26 Jun 2026 02:37:17 +0200 (CEST) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-491609cdd8fso2620675e9.2 for ; Thu, 25 Jun 2026 17:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20251104; t=1782434237; x=1783039037; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VpZcHw2NBHq0BkAD+UBdRuJ5E7VdAGmrSf5WbR61kBg=; b=X1I7OVhfelFlTrydGrvkimqG8rVGyULtCLN7fmmxKwDL4CX+L3DFdyeYnjYvS1t/tm E2LslzR7P4WMOS/nMjmxaglEP8ycCxr4XyNEnlGlfHJ+EeQvLz5btS+gC6A8TTIg8/SV WBCaG+So2hZA+jQMsbW/xFVz0NHOtYDizEELwNXthXlg5udVp7k/9IAeAKzJov2KwNK3 ntU+xj79Y6UwHiraXpcWnTohOPBx9Ut6taHO1F+PpIcCB1U4tQANAZh7bu68Jb+16xTT Bbeh25gx1Z3VMwHFatmbO+EkYG02SEQnKg5xWSsZRXezkXpJpM35OHwoi9hUehaJXnlt c/mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782434237; x=1783039037; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=VpZcHw2NBHq0BkAD+UBdRuJ5E7VdAGmrSf5WbR61kBg=; b=kk7GlV7g7glNbAQgi1JT1uOLj2WfT+5mIRXJSdXz4872DK09L0cuPkNsiLvevXl+UF C34QFiQpwuV6as37ACgCIFJp1tws1A8M0mzB4bwwxm2wOqQbzOqrCXy2Ao/27Apo/2Fx OUUk7uhtsn0csIoaClF5gjgjY1omDZcPCFOPpzsQXstJgdE35sd2adEZxCCxsIhOldR9 OlvX13vL4L8cudLugG5mlTqAE6xJmovI4sutUC0JgWaXZKw12hmK27XK9UKV4/bMOCmk sriWQ4MjUuBpQVpMVN5egSnzrLacFKGa7KNw8kkQsSHMlUNlEu/ls9DZNeYqfXAJTu+P FkWQ== X-Gm-Message-State: AOJu0YyDf/OHOOGvHLNKHAqFFZt3/BocprJjA6B7Rmk67oh/3oTQL8TV CMFqyIl+G6uD6YmYp+4Q3SBnyG/QequK4OyJUxIAC7EENNLIbRXZtMqrTxhXLw== X-Gm-Gg: AfdE7clwUcnIEGMhVaGVlnrkukl70wUUtkziNtBUy/ENUg57IUkwPavOHgZ+AFao51+ Z+t4bK4THaL/wU82WlSyyfIHmqHF54Z8vKhGPy588bacUzD7qne0VmFhNCrAuCnyRLPfx2d7YdK 5/SxAfQWX7V+GI8YcbMxjGYASy7ACLwh5Rg9h/nqKnQ5Ha8pAqvnu5AqnS9T4+vpMTxUe8GwLNV vrlcSyhX7KJs5RXBMW3tfaYlkpGJugRVYZMs1ZfmbMFjo3Mik8O7FK+NgJ15x8G1XYTMXCG0299 j3BGMR2UfWnYrWLwN9NdydlGjYviAFhGmAxFSL7fRmVStIaOrfsUzTbmP29upy5N8f9b2/6E1zu hnbTWt0l7GuhUOq//e4zeBBGePP27+nT236IoyQgdL6XR/FMMn9ynzgdviJCmx964WNF4vJoETM LEtlOe1fiavmYSc+WuiAShGhSBqlaTrFRJUhagD8ajQlezZlg6S0xK7M6i65vEAR0ssQU8rjgg4 wBJ6A== X-Received: by 2002:a05:600d:844f:10b0:490:ae52:499c with SMTP id 5b1f17b1804b1-49266899ff0mr53044655e9.21.1782434237283; Thu, 25 Jun 2026 17:37:17 -0700 (PDT) Received: from localhost.localdomain (p5ddcc513.dip0.t-ipconnect.de. [93.220.197.19]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-46f0db007b3sm762055f8f.2.2026.06.25.17.37.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2026 17:37:16 -0700 (PDT) From: Bruce Allen To: libcamera-devel@lists.libcamera.org Subject: [PATCH v1 2/2] docs: Document SensorSequence request metadata Date: Fri, 26 Jun 2026 02:37:12 +0200 Message-ID: <20260626003712.26624-3-ballen4705@googlemail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260626003712.26624-1-ballen4705@googlemail.com> References: <20260626003712.26624-1-ballen4705@googlemail.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Describe how applications read SensorSequence from Request::metadata() and how it differs from per-buffer FrameMetadata::sequence. Signed-off-by: Bruce Allen --- .../guides/application-developer.rst | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst index a9620ca..996aa9b 100644 --- a/Documentation/guides/application-developer.rst +++ b/Documentation/guides/application-developer.rst @@ -469,6 +469,34 @@ and the bytes used by planes. seq: 000040 bytesused: 1843200 seq: 000042 bytesused: 1843200 +Request metadata +~~~~~~~~~~~~~~~~ + +Completed requests also expose metadata as a :doxy-pub:`ControlList` through +:doxy-pub:`Request::metadata()`. Pipeline handlers populate this list with +controls defined as ``direction: out`` in the control definition YAML files. + +Common entries include :doxy-pub:`controls::SensorTimestamp` and +:doxy-pub:`controls::FrameWallClock`. On Raspberry Pi VC4 pipelines, the vendor +control ``controls::rpi::SensorSequence`` reports the Unicam frontend +``FrameBuffer::metadata().sequence`` for the sensor frame. + +While per-buffer :doxy-pub:`FrameMetadata::sequence` identifies frames in each +completed stream, ``SensorSequence`` reflects the sensor/frontend capture path. +If the value increases by more than one between consecutive completed requests, +frames were not captured into the frontend stream before the earlier request +finished. This complements sequence numbers derived from request delivery and +is intended for diagnosing sensor-side frame continuity. + +.. code:: cpp + + const ControlList &metadata = request->metadata(); + if (auto seq = metadata.get(controls::rpi::SensorSequence)) + std::cout << " sensor sequence: " << *seq << std::endl; + +See also ``controls::rpi::ControlListSequence``, which reports when a request's +control list was applied rather than frontend capture timing. + A completed buffer contains of course image data which can be accessed through the per-plane dma-buf file descriptor transported by the ``FrameBuffer`` instance. An example of how to write image data to disk is available in the