Patch Detail
Show a patch.
GET /api/1.1/patches/18246/?format=api
{ "id": 18246, "url": "https://patchwork.libcamera.org/api/1.1/patches/18246/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18246/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20230203094424.25243-2-naush@raspberrypi.com>", "date": "2023-02-03T09:44:17", "name": "[libcamera-devel,v1,1/8] libcamera: stream: Add stream hints to StreamConfiguration", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f383ca037e2caed6d5c4511766508762b54b6524", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18246/mbox/", "series": [ { "id": 3739, "url": "https://patchwork.libcamera.org/api/1.1/series/3739/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3739", "date": "2023-02-03T09:44:16", "name": "Stream hints", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3739/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18246/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18246/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 922CFC3243\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 3 Feb 2023 09:44:30 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4AC5A625EB;\n\tFri, 3 Feb 2023 10:44:30 +0100 (CET)", "from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com\n\t[IPv6:2a00:1450:4864:20::42e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 71AA661EF4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 3 Feb 2023 10:44:28 +0100 (CET)", "by mail-wr1-x42e.google.com with SMTP id a2so3825606wrd.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 03 Feb 2023 01:44:28 -0800 (PST)", "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tf17-20020a5d50d1000000b002bfe266d710sm1562503wrt.90.2023.02.03.01.44.27\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 03 Feb 2023 01:44:27 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1675417470;\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=MJMAWdoB9XlLnvxPSB8FP9fYUXe+mp/LsGmmqY0q5OFIxPYBnrp6L/TgqkMlMsGtV\n\t0g+Gk7xSx3VnsQU7yU0gZa1oy9VXnS7D8Hq5dAWk0D7C8/olKbih9Ll4qMKLxwS/zE\n\t9N0dH1QROEfYQO8snhiWUvFPaXiBGS9VKvHiozrXyu1ASCfMjnkcKRV7o+EgwFpoZI\n\tQQpcIjsIBU1ZlfEzkj/J06XOn0MpVEn3uG4tUBP4kPUCQp6TxBjVePXaFnrkQcKsoq\n\tF3cdTdM53FfZW6cxyhIjX6xhVhvaeEX7/NehqokCSmkZ+il9b5hsdXS75ju88xjSQy\n\t2LOSYTSDJ8M3w==", "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=crDRBVLYdCn1zaQETs2AOz3gG/uoK/KQMv4pygtjKfqb3GlXa7WyidXkIXVBHiefVA\n\tE3HEI6hEDcMwWsiNr4Q0guMKbGt/n4h8733wcR1zqtGGsfS+fzxc9xnPtNoW2jO2ELuH\n\tbUSZiNmwqjIIQdXLsyFcPSCPohdSNGpJa6S5D8Vah9Dxx6E6L92eLYbC5KyvWDorvmy7\n\tO06S1yIh4OuQW/79bXVmYCven0safP5mogvnuoSDgJ11MXPoGDGkW1E5DI6iA02/XBNu\n\tsrL0JgsIoyJHmmQokhC7ZJmGhBJowvSk2HWkmQyaMsUKQT5ZmOvzeDZccfiNR7sAUos4\n\tHJCQ==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"crDRBVLY\"; 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=phBqpOPt4i+AGzldmvfr+9ur5itMflgKcZTXi14OJ/7qwxRS608xTc/FE7bey97ble\n\tD+m1eEkmceyQlC/oepSbOBQfF5cmuFvJqlCWh+0m1vG2CjoChQJszS6oyAUdFadXWPRI\n\t/f3OGSiCl6/EFRtl7Qw4QOkzBVK03EX+mj7wpdzRx4fo+KVrq2jHL0LAWbS38KDDy/kl\n\tkypqYueD8TXapyrBcOdvy2cUKrsKMmIj0Go1ZLm8HBqMrmf1ZwIbtVkcTAh+8fRshDmo\n\t8l1l1V0vT0JkJ1E4ect96zYvM3NXk/Ek6KM51YI6cqMA3mZourW+QgQIMWsSOk9DIO0N\n\tTSrA==", "X-Gm-Message-State": "AO0yUKVQ/XbZhfa65bH1P+qrLx+C9qM/7Prv/a77aIkHbG2N1yvfG/WN\n\t+dHtO27h8cvUAzp1tkdn27Vy7YklIs67m3Zlup+YRg==", "X-Google-Smtp-Source": "AK7set/wXMmExU+hil82JZOZ4jXdrTMad8/PT6mwOJIRj2OPp0vhbO6XixVcAmTbAd+kbrjbDpmsCA==", "X-Received": "by 2002:adf:dc03:0:b0:2bf:f2f2:7d64 with SMTP id\n\tt3-20020adfdc03000000b002bff2f27d64mr8415689wri.33.1675417467848; \n\tFri, 03 Feb 2023 01:44:27 -0800 (PST)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 3 Feb 2023 09:44:17 +0000", "Message-Id": "<20230203094424.25243-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230203094424.25243-1-naush@raspberrypi.com>", "References": "<20230203094424.25243-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v1 1/8] 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", "v1", "1/8" ] }