{"id":27199,"url":"https://patchwork.libcamera.org/api/patches/27199/?format=json","web_url":"https://patchwork.libcamera.org/patch/27199/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260703224817.15650-3-ballen4705@googlemail.com>","date":"2026-07-03T22:48:17","name":"[v2,2/2] docs: Document SensorSequence request metadata","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"4b7bd275efffd97710ec9ced675bd6c2ae8e89e9","submitter":{"id":321,"url":"https://patchwork.libcamera.org/api/people/321/?format=json","name":"Bruce Allen","email":"ballen4705@googlemail.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/27199/mbox/","series":[{"id":6037,"url":"https://patchwork.libcamera.org/api/series/6037/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=6037","date":"2026-07-03T22:48:15","name":"libcamera: Add SensorSequence request metadata control","version":2,"mbox":"https://patchwork.libcamera.org/series/6037/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/27199/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/27199/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id DA6B3C3308\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  3 Jul 2026 22:50:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 32E0E65FE9;\n\tSat,  4 Jul 2026 00:50:01 +0200 (CEST)","from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 277F065FB5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  4 Jul 2026 00:49:58 +0200 (CEST)","by mail-wm1-x333.google.com with SMTP id\n\t5b1f17b1804b1-493c7902f47so6486685e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 03 Jul 2026 15:49:58 -0700 (PDT)","from localhost.localdomain (tmo-121-138.customers.d1-online.com.\n\t[80.187.121.138]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-493c63ba971sm255611285e9.13.2026.07.03.15.49.56\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 03 Jul 2026 15:49:57 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlemail.com header.i=@googlemail.com\n\theader.b=\"i4YItvlC\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlemail.com; s=20251104; t=1783118997; x=1783723797;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=X5E9jgqo5PelCrftwdDhW9a7ZzIqhrOuJ9XfjBwJ+aw=;\n\tb=i4YItvlCXpuLUm39CIjeg/YAsCoHEsn6To2xadXyytVSMoDhDzyKrgkrDhKlACV7Br\n\tLEgOfpXVzjUJ3qBSySSWH9vpl3mgG84JF9EcFhfL8egi+pfo7Aq1HLf/+nCcHlRnP6Bn\n\tj6f/trvjibyCBWUkUglrgvMfzwYc7jDaYLDRfEIEbCT5GaNWaDXrE93DlEMh+ou5WVry\n\tY65ZPaNERnNE+4Exi4bLZIUJL0ZC8ADQuUpUSJ2T0P1wK2Vo9Zg6/9NjPo2K8WujOCpE\n\tMPRcyPnwYMOwgxhfDfKNnswiX0fLxd/9Io8VyB+b3LKHgLCMAOYL/FBHZxfDLydzXaVP\n\tZyUA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1783118997; x=1783723797;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=X5E9jgqo5PelCrftwdDhW9a7ZzIqhrOuJ9XfjBwJ+aw=;\n\tb=p+6TsaFtdZ6I1KdAiae5EfEJXg2h3UZyNQm3RRfktB4zvmf2R09CshQ95oeU375Ee8\n\tLBk2nurhyv21Dmk1wdHB8dIb4s2hvmdgPNF4t9FBUNNUr2V2uzTgM6B/O8a+Vzysjayz\n\tWi/hLAmDSTbGEhUtWv5/mj3mFEEf9Rc1o+AqXLFoY8avg8FlEnCxGr/LTlAP25f0ZCTH\n\tiw8Hi/DGu3AearGbpB74uWtZR/VAfpnHkk/egGTHRdHyBFARcCol23tJzpeFVxABQ3Pa\n\tytoTXRqTc2lsASmYSobI2aXD8OBp7wzCagRxatjW6aXRUKBybx4lmth124yD7hHQ8jLm\n\tfgGA==","X-Gm-Message-State":"AOJu0YzPWSXQVHb99ZpHJFp2nErbqZroYQ3rQJ+9cV/wRrgJVwf7SE0M\n\t69lR83PMRm8hsTrwPRTVWRWo0zK1CoXqfU4xLZLIScl28bNwTd0aibEch5YppLDk","X-Gm-Gg":"AfdE7cnR9xgTC27xrSHoaS7rAhEd2Bb28kmYchkqMsM6j2hFrnznc6LgS/jKIQj2yFI\n\tgbZkaSwiuj2vT0fL7JC6QvoJAqABC5lp7aO9Z5HN2ncKzR7d05sJtnchMiekBoDSb/Zeje2FXTE\n\tA0hyeT7GvRiDR3XGQxisTk5l/plYqFczpObt1WdPz097U1K7j6+VPV4yG+pAe5ZV20JCmENen/T\n\ttpaidy1a29HabjSLISMjqHO01j7ICyL4FVvsM7OmffNNT0Og2uIZGdU5RRbp+S1sbFnNGMQ+DAd\n\t270YekTzeumi157EaSli8iH8Nxzij6qpZprDXcUTBMo2R04DESFxAEUSp7VOGxCknbVdPYr8Rlq\n\tLmNzRyVnBQoZBRrV63DBxYYY7b8QxRa31tfgFfwvaa7sAHffUSm/+twbeQvHB4cg9DnRg6m1gUu\n\tlu3pPAHwQ4FlDY3mulI9Y+4R0XKgNqMEQxQ/9TSuh37kxv885HMYAZnd6I16LgK+e2xMcosoHcS\n\tshcc0ZN6L0=","X-Received":"by 2002:a05:600c:c16e:b0:493:c068:db11 with SMTP id\n\t5b1f17b1804b1-493d11f7ccamr10181815e9.26.1783118997392; \n\tFri, 03 Jul 2026 15:49:57 -0700 (PDT)","From":"Bruce Allen <ballen4705@googlemail.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Bruce Allen <ballen4705@googlemail.com>","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>\n\t<20260703224817.15650-1-ballen4705@googlemail.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Describe how applications read SensorSequence from Request::metadata() and\nhow it differs from per-buffer FrameMetadata::sequence.\n\nSigned-off-by: Bruce Allen <ballen4705@googlemail.com>\n---\n Documentation/guides/application-developer.rst | 26 ++++++++++++++++++++++\n 1 file changed, 26 insertions(+)","diff":"diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst\nindex a9620ca..77b4135 100644\n--- a/Documentation/guides/application-developer.rst\n+++ b/Documentation/guides/application-developer.rst\n@@ -469,6 +469,32 @@ and the bytes used by planes.\n    seq: 000040 bytesused: 1843200\n    seq: 000042 bytesused: 1843200\n \n+Request metadata\n+~~~~~~~~~~~~~~~~\n+\n+Completed requests also expose metadata as a :doxy-pub:`ControlList` through\n+:doxy-pub:`Request::metadata()`. Pipeline handlers populate this list with\n+controls defined as ``direction: out`` in the control definition YAML files.\n+\n+Common entries include :doxy-pub:`controls::SensorTimestamp`,\n+:doxy-pub:`controls::FrameWallClock`, and :doxy-pub:`controls::SensorSequence`.\n+The latter reports the sequence number from the sensor-facing capture device\n+(for example the CSI-2 receiver or V4L2 video node) for the frame associated\n+with the request.\n+\n+While per-buffer :doxy-pub:`FrameMetadata::sequence` identifies frames in each\n+completed stream, ``SensorSequence`` reflects the sensor-side capture path. If\n+the value increases by more than one between consecutive completed requests,\n+frames were not captured before the earlier request finished. This complements\n+sequence numbers derived from request delivery and is intended for diagnosing\n+frame continuity.\n+\n+.. code:: cpp\n+\n+   const ControlList &metadata = request->metadata();\n+   if (auto seq = metadata.get<int64_t>(controls::SensorSequence))\n+      std::cout << \" sensor sequence: \" << *seq << std::endl;\n+\n A completed buffer contains of course image data which can be accessed through\n the per-plane dma-buf file descriptor transported by the ``FrameBuffer``\n instance. An example of how to write image data to disk is available in the\n","prefixes":["v2","2/2"]}