From patchwork Fri Jul 3 22:48:17 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Allen X-Patchwork-Id: 27199 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 DA6B3C3308 for ; Fri, 3 Jul 2026 22:50:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 32E0E65FE9; Sat, 4 Jul 2026 00:50:01 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.b="i4YItvlC"; dkim-atps=neutral Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 277F065FB5 for ; Sat, 4 Jul 2026 00:49:58 +0200 (CEST) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-493c7902f47so6486685e9.1 for ; Fri, 03 Jul 2026 15:49:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20251104; t=1783118997; x=1783723797; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=X5E9jgqo5PelCrftwdDhW9a7ZzIqhrOuJ9XfjBwJ+aw=; b=i4YItvlCXpuLUm39CIjeg/YAsCoHEsn6To2xadXyytVSMoDhDzyKrgkrDhKlACV7Br LEgOfpXVzjUJ3qBSySSWH9vpl3mgG84JF9EcFhfL8egi+pfo7Aq1HLf/+nCcHlRnP6Bn j6f/trvjibyCBWUkUglrgvMfzwYc7jDaYLDRfEIEbCT5GaNWaDXrE93DlEMh+ou5WVry Y65ZPaNERnNE+4Exi4bLZIUJL0ZC8ADQuUpUSJ2T0P1wK2Vo9Zg6/9NjPo2K8WujOCpE MPRcyPnwYMOwgxhfDfKNnswiX0fLxd/9Io8VyB+b3LKHgLCMAOYL/FBHZxfDLydzXaVP ZyUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783118997; x=1783723797; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=X5E9jgqo5PelCrftwdDhW9a7ZzIqhrOuJ9XfjBwJ+aw=; b=p+6TsaFtdZ6I1KdAiae5EfEJXg2h3UZyNQm3RRfktB4zvmf2R09CshQ95oeU375Ee8 LBk2nurhyv21Dmk1wdHB8dIb4s2hvmdgPNF4t9FBUNNUr2V2uzTgM6B/O8a+Vzysjayz Wi/hLAmDSTbGEhUtWv5/mj3mFEEf9Rc1o+AqXLFoY8avg8FlEnCxGr/LTlAP25f0ZCTH iw8Hi/DGu3AearGbpB74uWtZR/VAfpnHkk/egGTHRdHyBFARcCol23tJzpeFVxABQ3Pa ytoTXRqTc2lsASmYSobI2aXD8OBp7wzCagRxatjW6aXRUKBybx4lmth124yD7hHQ8jLm fgGA== X-Gm-Message-State: AOJu0YzPWSXQVHb99ZpHJFp2nErbqZroYQ3rQJ+9cV/wRrgJVwf7SE0M 69lR83PMRm8hsTrwPRTVWRWo0zK1CoXqfU4xLZLIScl28bNwTd0aibEch5YppLDk X-Gm-Gg: AfdE7cnR9xgTC27xrSHoaS7rAhEd2Bb28kmYchkqMsM6j2hFrnznc6LgS/jKIQj2yFI gbZkaSwiuj2vT0fL7JC6QvoJAqABC5lp7aO9Z5HN2ncKzR7d05sJtnchMiekBoDSb/Zeje2FXTE A0hyeT7GvRiDR3XGQxisTk5l/plYqFczpObt1WdPz097U1K7j6+VPV4yG+pAe5ZV20JCmENen/T tpaidy1a29HabjSLISMjqHO01j7ICyL4FVvsM7OmffNNT0Og2uIZGdU5RRbp+S1sbFnNGMQ+DAd 270YekTzeumi157EaSli8iH8Nxzij6qpZprDXcUTBMo2R04DESFxAEUSp7VOGxCknbVdPYr8Rlq LmNzRyVnBQoZBRrV63DBxYYY7b8QxRa31tfgFfwvaa7sAHffUSm/+twbeQvHB4cg9DnRg6m1gUu lu3pPAHwQ4FlDY3mulI9Y+4R0XKgNqMEQxQ/9TSuh37kxv885HMYAZnd6I16LgK+e2xMcosoHcS shcc0ZN6L0= X-Received: by 2002:a05:600c:c16e:b0:493:c068:db11 with SMTP id 5b1f17b1804b1-493d11f7ccamr10181815e9.26.1783118997392; Fri, 03 Jul 2026 15:49:57 -0700 (PDT) Received: from localhost.localdomain (tmo-121-138.customers.d1-online.com. [80.187.121.138]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493c63ba971sm255611285e9.13.2026.07.03.15.49.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2026 15:49:57 -0700 (PDT) From: Bruce Allen To: libcamera-devel@lists.libcamera.org Cc: Bruce Allen Subject: [PATCH v2 2/2] docs: Document SensorSequence request metadata Date: Fri, 3 Jul 2026 23:48:17 +0100 Message-ID: <20260703224817.15650-3-ballen4705@googlemail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260703224817.15650-1-ballen4705@googlemail.com> References: <20260626003712.26624-1-ballen4705@googlemail.com> <20260703224817.15650-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 --- Documentation/guides/application-developer.rst | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst index a9620ca..77b4135 100644 --- a/Documentation/guides/application-developer.rst +++ b/Documentation/guides/application-developer.rst @@ -469,6 +469,32 @@ 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`, +:doxy-pub:`controls::FrameWallClock`, and :doxy-pub:`controls::SensorSequence`. +The latter reports the sequence number from the sensor-facing capture device +(for example the CSI-2 receiver or V4L2 video node) for the frame associated +with the request. + +While per-buffer :doxy-pub:`FrameMetadata::sequence` identifies frames in each +completed stream, ``SensorSequence`` reflects the sensor-side capture path. If +the value increases by more than one between consecutive completed requests, +frames were not captured before the earlier request finished. This complements +sequence numbers derived from request delivery and is intended for diagnosing +frame continuity. + +.. code:: cpp + + const ControlList &metadata = request->metadata(); + if (auto seq = metadata.get(controls::SensorSequence)) + std::cout << " sensor sequence: " << *seq << std::endl; + 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