Show a patch.

GET /api/patches/18201/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 18201,
    "url": "https://patchwork.libcamera.org/api/patches/18201/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18201/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20230127154322.29019-2-naush@raspberrypi.com>",
    "date": "2023-01-27T15:43:08",
    "name": "[libcamera-devel,v6,01/15] libcamera: stream: Add stream hints to StreamConfiguration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "f383ca037e2caed6d5c4511766508762b54b6524",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/18201/mbox/",
    "series": [
        {
            "id": 3728,
            "url": "https://patchwork.libcamera.org/api/series/3728/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3728",
            "date": "2023-01-27T15:43:07",
            "name": "[libcamera-devel,v6,01/15] libcamera: stream: Add stream hints to StreamConfiguration",
            "version": 6,
            "mbox": "https://patchwork.libcamera.org/series/3728/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18201/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18201/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 2E66BBDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Jan 2023 15:43:41 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B6AA5625EF;\n\tFri, 27 Jan 2023 16:43:38 +0100 (CET)",
            "from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C9ED761EFA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Jan 2023 16:43:36 +0100 (CET)",
            "by mail-wm1-x329.google.com with SMTP id j17so3774841wms.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Jan 2023 07:43:36 -0800 (PST)",
            "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\th18-20020a05600c30d200b003c21ba7d7d6sm4549566wmn.44.2023.01.27.07.43.35\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 27 Jan 2023 07:43:35 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674834218;\n\tbh=1NQfkm46gkmlgegsWn0lnrEGMhw+21+M3ZnxqhkEqek=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=E6D3sinvRJQkc6Je7MfllTa14o8AnSYRY1tbSu5mmpvwGEK1JjUVFR3TizOFgZi5L\n\tVnXYGFG1lW7YS5xSKba7RpyPeRDo++aQHSdgDp4yBpSyL6WOekgwprXqnwcVbQn3XS\n\tjOZfXR/0tDe7Jkbw4ODJ3EjJ3oReX4v5x/pJ8TKhFeDv0MnBmHJxZMybVhVKMaAQTE\n\tCBR4lZYu8lxoi/EVSdf/DihTjisJMyDQLNUgLHiwz7AWiGX98+j4pHuRZTpEHNwQwv\n\tP91CSGT4T6x5zEkMQSBn418pBN60ADpTyQOLGikeSRgjxJ4aMh0eGjCIyXGgUH8sn7\n\tGnc/0pGde/oSQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\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=/Puf9MTPyfFZF0uns/wRRwCfjTobp9ecB2pODryenMo=;\n\tb=P7KpJQoOjJ2vx0fX3W9dIWcNfi+GU7vxE5Lf5FWj39Ervrpt/rVHOLJU2uTsU1447e\n\t14aGQyfghDdnNW9Jvr427W9wkK0XakGzC1LuWm4tT8giyguxp4Kb+vNuW7K99oxsuEeA\n\tSXoerMFy3WpndV8sRsFx+4pNSDvMfJJZgtkoEoxFBboO4VY5GFn6W0qORwT8atEglQxd\n\tGF1NwzVCknXl//3RLjnnkb5xMJ9eAFarFqnzy0CKnkRW3I5nt1aaBarV1pLRnyYclE4h\n\tSfH1fUXbR8aVXtzm2r1i3QBDItUwizsqTy1ltZtQ0+cppe89voUpWbyQRXFsVGNK8e1K\n\tL7Dw=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"P7KpJQoO\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=/Puf9MTPyfFZF0uns/wRRwCfjTobp9ecB2pODryenMo=;\n\tb=gjyLuNvdq7VVx2lrEuT51T9IrP7swSCrFipGQOBpPhN9Kf54zu24PBdvBtnL+l/Ve7\n\t9+Ek6/awdGIOK9b3kW2+g4Bir/MZek9BKYu+zEVsexOja7P1P9Cz1cKxWJV1Li7Tj+bH\n\tWYsAI0Tr9pux9Faik0u5HGiwEPz6qPhSm/igL0+KdFoCXk81RC1iXOro4MMV1rDes8UL\n\tP8s0AM93RwZ4reroKFQomravHgzpOS9FVHOxnOKPS7QfvQUgYetA+IW9Qn8r5iIbYbjj\n\tYPb2fk9ERfH69cVnBWDP8vcX9W4g95X1inhcKPK/cFoLmeRMPhZMjQyDizatC2BIevTi\n\tBOFw==",
        "X-Gm-Message-State": "AFqh2kp37LO8/yTV4WC0C07o9guZWEVl7wZqAw4nFDCzA8Z60xflCmLf\n\tsFxJxefITc2yoi1mZdUuc+Eb+sFYk6k3N1r1I0s=",
        "X-Google-Smtp-Source": "AMrXdXtzvtOaD+rMRwXG0xawSPbEa1lBz05TMDWpkaYIPvnDWr3l3VBND8ATCZvDyzzDGO4n0swV+Q==",
        "X-Received": "by 2002:a05:600c:5114:b0:3db:254e:59a9 with SMTP id\n\to20-20020a05600c511400b003db254e59a9mr31104326wms.15.1674834216045; \n\tFri, 27 Jan 2023 07:43:36 -0800 (PST)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 27 Jan 2023 15:43:08 +0000",
        "Message-Id": "<20230127154322.29019-2-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230127154322.29019-1-naush@raspberrypi.com>",
        "References": "<20230127154322.29019-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v6 01/15] libcamera: stream: Add stream\n\thints to StreamConfiguration",
        "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>",
        "From": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Naushir Patuck <naush@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a new hints flags field in the StreamConfiguration structure to allow the\napplication to specify certain intended behavior when driving libcamera.\nPipeline handlers are expected to look at these hint flags and may optimise\ninternal operations based on them.\n\nCurrently, only one flag is listed, MandatoryStream, which the application can\nset to inform the pipeline handler that a buffer will always be provided on\nevery Request for a given stream.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n include/libcamera/stream.h |  8 ++++++++\n src/libcamera/stream.cpp   | 25 +++++++++++++++++++++++++\n 2 files changed, 33 insertions(+)",
    "diff": "diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nindex 29235ddf0d8a..56e5a74b2aab 100644\n--- a/include/libcamera/stream.h\n+++ b/include/libcamera/stream.h\n@@ -13,6 +13,8 @@\n #include <string>\n #include <vector>\n \n+#include <libcamera/base/flags.h>\n+\n #include <libcamera/color_space.h>\n #include <libcamera/framebuffer.h>\n #include <libcamera/geometry.h>\n@@ -51,6 +53,12 @@ struct StreamConfiguration {\n \n \tstd::optional<ColorSpace> colorSpace;\n \n+\tenum class Hint {\n+\t\tNone = 0,\n+\t\tMandatoryStream = (1 << 0),\n+\t};\n+\tFlags<Hint> hints;\n+\n \tStream *stream() const { return stream_; }\n \tvoid setStream(Stream *stream) { stream_ = stream; }\n \tconst StreamFormats &formats() const { return formats_; }\ndiff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\nindex 67f308157fbf..9b0e8dd548cf 100644\n--- a/src/libcamera/stream.cpp\n+++ b/src/libcamera/stream.cpp\n@@ -349,6 +349,31 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)\n  * color spaces can be supported and in what combinations.\n  */\n \n+/**\n+ * \\enum StreamConfiguration::Hint\n+ * \\brief List of available hint flags provided by the application for a stream\n+ *\n+ * \\var StreamConfiguration::Hint::None\n+ * No hints for this stream.\n+ * \\var StreamConfiguration::Hint::MandatoryStream\n+ * Informs the pipeline handler that the application will always provide a\n+ * buffer for the configured stream in every Request. This may ensure the\n+ * pipeline handler does not need any additional stream buffer allocations for\n+ * internal use.\n+ */\n+\n+/**\n+ * \\var StreamConfiguration::hints\n+ * \\brief Application provided StreamConfiguration::Hint flags for specific\n+ * stream behavior\n+ *\n+ * Provides hints from the application to the pipeline handlers on how it\n+ * intends on handling a given configured stream. These hints may alter the\n+ * behavior of the pipeline handlers, for example, by not allocating additional\n+ * buffers for internal use if an application guarantees buffers will be\n+ * provided in every Request for a stream.\n+ */\n+\n /**\n  * \\fn StreamConfiguration::stream()\n  * \\brief Retrieve the stream associated with the configuration\n",
    "prefixes": [
        "libcamera-devel",
        "v6",
        "01/15"
    ]
}