Patch Detail
Show a patch.
GET /api/patches/21578/?format=api
{ "id": 21578, "url": "https://patchwork.libcamera.org/api/patches/21578/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21578/", "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": "<20241009200142.3213065-3-chenghaoyang@chromium.org>", "date": "2024-10-09T19:58:51", "name": "[2/2] libcamera: Add V4L2VideoDevice::getCachedFormat", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "875c1b4be85bd6de66b1c585ab7524d80284d1b5", "submitter": { "id": 117, "url": "https://patchwork.libcamera.org/api/people/117/?format=api", "name": "Cheng-Hao Yang", "email": "chenghaoyang@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/21578/mbox/", "series": [ { "id": 4679, "url": "https://patchwork.libcamera.org/api/series/4679/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4679", "date": "2024-10-09T19:58:49", "name": "Add V4L2DeviceFormat support", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4679/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21578/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21578/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 3A901C32E7\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 9 Oct 2024 20:01:54 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E02EE65371;\n\tWed, 9 Oct 2024 22:01:53 +0200 (CEST)", "from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com\n\t[IPv6:2607:f8b0:4864:20::62b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 34599618C5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 9 Oct 2024 22:01:52 +0200 (CEST)", "by mail-pl1-x62b.google.com with SMTP id\n\td9443c01a7336-20c5a7b2908so1058775ad.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 09 Oct 2024 13:01:52 -0700 (PDT)", "from chenghaoyang-low.c.googlers.com.com\n\t(199.211.81.34.bc.googleusercontent.com. [34.81.211.199])\n\tby smtp.gmail.com with ESMTPSA id\n\td9443c01a7336-20c54056b07sm30370205ad.64.2024.10.09.13.01.49\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 09 Oct 2024 13:01:49 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"DT+PzoMc\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1728504110; x=1729108910;\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=dEOyYZLtMlIrWbCLSXaCKiqq1mB/bN8VsxFFN4jSrqw=;\n\tb=DT+PzoMc9cXyXtmsU9i9+0x7KyV8hQrD2uHGx8sK/96QUWrSc6EPaVMqlIs18Pe0NL\n\tX+SHFZ83Eycj5+Yy/0cOACUNOGLq2/QQ9Cwi74+LTzkrkf6T61TClJ06NzKOQBrBwvKy\n\t6lJZXgJIcHyvzCN6HYJnCPKzEnJXokoEJjlkM=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1728504110; x=1729108910;\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=dEOyYZLtMlIrWbCLSXaCKiqq1mB/bN8VsxFFN4jSrqw=;\n\tb=dHwZmetxg9v/ZjLMm3drl9mrQZts6k7pyxOzDXqRaf9SuW5KbUrQPWPxPw7VXCSnVO\n\tSy95CT5zmsCYB5+bUjmT387bfgAMgS5cJH+oJesy1gPE/JlCsYc4HWARDCACVH8FH1w7\n\tDKfsxlAVN7O3/fTBnBaJLSvq7UDpllWUSzyYZf14aQeAAa37a/ispKF3DlxozdJLtjuU\n\tHd7XVDEnXdd8Nv8pEPKEzv3fUIhQolUqKm/uIHFHSqFegvqZBNIKdI7fcPRGKpFaCpc9\n\tpHPJ1awtfgImTeNhAjxjEBcUjzunB2x1NaaJc4dZTbxBTG0hL8ym5fkFU6/DmaOVUcLx\n\teOhw==", "X-Gm-Message-State": "AOJu0YwUIImmJnIKqildZZTIcFKzLS4jkyI1zno3bVukx9kvw6drCOMg\n\thzlJCgmLgeVBCKmTR4Un5ribPekYpuFmJPfVBIBNEBq0ZK6SH8JTh4VgbOWDmg4lnj8iAwd6n6M\n\t=", "X-Google-Smtp-Source": "AGHT+IGIOWeuJqxPqJ5NjZPNMtHAlmMlG1+IgKTXlUi9tR11zEDnxK/c0MkVTaWVTpHy0IxIHrDzoQ==", "X-Received": "by 2002:a17:902:ea12:b0:20c:6023:c02a with SMTP id\n\td9443c01a7336-20c6378fc21mr60598065ad.57.1728504110336; \n\tWed, 09 Oct 2024 13:01:50 -0700 (PDT)", "From": "Harvey Yang <chenghaoyang@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Harvey Yang <chenghaoyang@chromium.org>", "Subject": "[PATCH 2/2] libcamera: Add V4L2VideoDevice::getCachedFormat", "Date": "Wed, 9 Oct 2024 19:58:51 +0000", "Message-ID": "<20241009200142.3213065-3-chenghaoyang@chromium.org>", "X-Mailer": "git-send-email 2.47.0.rc0.187.ge670bccf7e-goog", "In-Reply-To": "<20241009200142.3213065-1-chenghaoyang@chromium.org>", "References": "<20241009200142.3213065-1-chenghaoyang@chromium.org>", "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": "In the upcoming mtkisp7 pipeline handler, it needs to access the cached\nformat from a derived class. This patch adds a protected getter to allow\nthat.\n\nSigned-off-by: Harvey Yang <chenghaoyang@chromium.org>\n---\n include/libcamera/internal/v4l2_videodevice.h | 2 ++\n src/libcamera/v4l2_videodevice.cpp | 5 +++++\n 2 files changed, 7 insertions(+)", "diff": "diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\nindex 9f53e37cd..389276302 100644\n--- a/include/libcamera/internal/v4l2_videodevice.h\n+++ b/include/libcamera/internal/v4l2_videodevice.h\n@@ -241,6 +241,8 @@ public:\n protected:\n \tstd::string logPrefix() const override;\n \n+\tV4L2DeviceFormat getCachedFormat() { return format_; }\n+\n private:\n \tLIBCAMERA_DISABLE_COPY(V4L2VideoDevice)\n \ndiff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 1110fb535..1f6ad96c1 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -2113,6 +2113,11 @@ V4L2VideoDevice::fromEntityName(const MediaDevice *media,\n \treturn std::make_unique<V4L2VideoDevice>(mediaEntity);\n }\n \n+/**\n+ * \\fn V4L2VideoDevice::getCachedFormat()\n+ * \\return Cached \\a V4L2VideoDevice::format_\n+ */\n+\n /**\n * \\brief Convert \\a PixelFormat to a V4L2PixelFormat supported by the device\n * \\param[in] pixelFormat The PixelFormat to convert\n", "prefixes": [ "2/2" ] }