Show a patch.

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

{
    "id": 2243,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/2243/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2243/",
    "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": "<20191027234312.35284-6-jacopo@jmondi.org>",
    "date": "2019-10-27T23:43:07",
    "name": "[libcamera-devel,05/10] libcamera: Define PixelFormat type",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "a0b097bde27d5da31d2dc0c8102c77602b484101",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/2243/mbox/",
    "series": [
        {
            "id": 559,
            "url": "https://patchwork.libcamera.org/api/1.1/series/559/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=559",
            "date": "2019-10-27T23:43:02",
            "name": "libcamera: Use DRM_FORMAT_* fourcc codes",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/559/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2243/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2243/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CA8966017C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Oct 2019 00:41:27 +0100 (CET)",
            "from uno.localdomain (143.121.2.93.rev.sfr.net [93.2.121.143])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 7C03B20002;\n\tSun, 27 Oct 2019 23:41:27 +0000 (UTC)"
        ],
        "X-Originating-IP": "93.2.121.143",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 28 Oct 2019 00:43:07 +0100",
        "Message-Id": "<20191027234312.35284-6-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20191027234312.35284-1-jacopo@jmondi.org>",
        "References": "<20191027234312.35284-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 05/10] libcamera: Define PixelFormat type",
        "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": "Sun, 27 Oct 2019 23:41:28 -0000"
    },
    "content": "Define a PixelFormat type as a simple typedef to an uin32_t which\naliases the DRM/KMS-defined fourcc pixel format codes.\n\nThe usage of a dedicated type allows better separation between image\nformat codes used internally (ie. V4L2-defined pixel formats and media\nbus codes) and application-facing image formats which use the\nDRM_FORMAT_* pixel codes.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/meson.build    |  1 +\n include/libcamera/pixelformats.h | 18 ++++++++++++++++++\n src/libcamera/meson.build        |  1 +\n src/libcamera/pixelformats.cpp   | 28 ++++++++++++++++++++++++++++\n 4 files changed, 48 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..c03335400b70\n--- /dev/null\n+++ b/src/libcamera/pixelformats.cpp\n@@ -0,0 +1,28 @@\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 as a 32-bit unsigned integer. The values are\n+ * defined in the Linux kernel DRM/KMS API (see linux/drm_fourcc.h).\n+ *\n+ * \\todo Add support for format modifiers\n+ */\n+\n+} /* namespace libcamera */\n",
    "prefixes": [
        "libcamera-devel",
        "05/10"
    ]
}