Patch Detail
Show a patch.
GET /api/patches/2287/?format=api
{ "id": 2287, "url": "https://patchwork.libcamera.org/api/patches/2287/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2287/", "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": "<20191028110208.15751-5-laurent.pinchart@ideasonboard.com>", "date": "2019-10-28T11:02:05", "name": "[libcamera-devel,v2,4/7] libcamera: Define a PixelFormat type for application-facing formats", "commit_ref": "656d8757347f1f9f5df93da863f66fa589cee063", "pull_url": null, "state": "accepted", "archived": false, "hash": "a7327760d1d792df3ef158d979d98c821c4063b3", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2287/mbox/", "series": [ { "id": 564, "url": "https://patchwork.libcamera.org/api/series/564/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=564", "date": "2019-10-28T11:02:01", "name": "libcamera: Introduce a PixelFormat type", "version": 2, "mbox": "https://patchwork.libcamera.org/series/564/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2287/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2287/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 898C760C09\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Oct 2019 12:02:20 +0100 (CET)", "from pendragon.ideasonboard.com (unknown [91.217.168.176])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3357CA4C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Oct 2019 12:02:20 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1572260540;\n\tbh=lkimjnwOVeZng17bZvKn4isISlKoi/meuKCRFeIbQcc=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=aRWFAE5TfoasmZr3sd6+WR3bkEp4mCi0tIxpRJ8pTdyv6EfjIPwka+XwS75+qDEhA\n\tdHigIX1YQtqIybNX0tPjM/0iHF1s52iXQQbfhoQL9buXfP3++SyybmkHSXnIvgNDp6\n\tA0s7yvLMiYSJGPzsCKwtf9/ZZCAEdQxFF/Bn9C/E=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 28 Oct 2019 13:02:05 +0200", "Message-Id": "<20191028110208.15751-5-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.23.0", "In-Reply-To": "<20191028110208.15751-1-laurent.pinchart@ideasonboard.com>", "References": "<20191028110208.15751-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 4/7] libcamera: Define a PixelFormat\n\ttype for application-facing formats", "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>", "X-List-Received-Date": "Mon, 28 Oct 2019 11:02:21 -0000" }, "content": "From: Jacopo Mondi <jacopo@jmondi.org>\n\nDefine a PixelFormat type as a simple typedef to an uin32_t. The usage\nof a dedicated type creates a cleaner and more self-described aPI.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/meson.build | 1 +\n include/libcamera/pixelformats.h | 18 ++++++++++++++++++\n src/libcamera/meson.build | 1 +\n src/libcamera/pixelformats.cpp | 26 ++++++++++++++++++++++++++\n 4 files changed, 46 insertions(+)\n create mode 100644 include/libcamera/pixelformats.h\n create mode 100644 src/libcamera/pixelformats.cpp", "diff": "diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\nindex ed8ff917e35a..99abf0609940 100644\n--- a/include/libcamera/meson.build\n+++ b/include/libcamera/meson.build\n@@ -9,6 +9,7 @@ libcamera_api = files([\n 'geometry.h',\n 'logging.h',\n 'object.h',\n+ 'pixelformats.h',\n 'request.h',\n 'signal.h',\n 'stream.h',\ndiff --git a/include/libcamera/pixelformats.h b/include/libcamera/pixelformats.h\nnew file mode 100644\nindex 000000000000..6e25b8d8b76e\n--- /dev/null\n+++ b/include/libcamera/pixelformats.h\n@@ -0,0 +1,18 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * pixelformats.h - libcamera pixel formats\n+ */\n+#ifndef __LIBCAMERA_PIXEL_FORMATS_H__\n+#define __LIBCAMERA_PIXEL_FORMATS_H__\n+\n+#include <stdint.h>\n+\n+namespace libcamera {\n+\n+using PixelFormat = uint32_t;\n+\n+} /* namespace libcamera */\n+\n+#endif /* __LIBCAMERA_PIXEL_FORMATS_H__ */\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex d329820b9582..f201f408ef07 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -25,6 +25,7 @@ libcamera_sources = files([\n 'message.cpp',\n 'object.cpp',\n 'pipeline_handler.cpp',\n+ 'pixelformats.cpp',\n 'process.cpp',\n 'request.cpp',\n 'signal.cpp',\ndiff --git a/src/libcamera/pixelformats.cpp b/src/libcamera/pixelformats.cpp\nnew file mode 100644\nindex 000000000000..9377fb5e0749\n--- /dev/null\n+++ b/src/libcamera/pixelformats.cpp\n@@ -0,0 +1,26 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * pixelformats.cpp - libcamera pixel formats\n+ */\n+\n+#include <libcamera/pixelformats.h>\n+\n+/**\n+ * \\file pixelformats.h\n+ * \\brief libcamera pixel formats\n+ */\n+\n+namespace libcamera {\n+\n+/**\n+ * \\typedef PixelFormat\n+ * \\brief libcamera image pixel format\n+ *\n+ * The PixelFormat type describes the format of images in the public libcamera\n+ * API. It stores a FourCC value in a 32-bit unsigned integer. The values are\n+ * defined in the Linux kernel V4L2 API (see linux/videodev2.h).\n+ */\n+\n+} /* namespace libcamera */\n", "prefixes": [ "libcamera-devel", "v2", "4/7" ] }