Show a patch.

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

{
    "id": 1313,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/1313/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1313/",
    "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": "<20190527090559.26549-3-jacopo@jmondi.org>",
    "date": "2019-05-27T09:05:55",
    "name": "[libcamera-devel,v2,2/6] libcamera: v4l2_device: Add support for META_OUTPUT",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "69093a49945343692f829d86e912d4e1c7e7ad97",
    "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/1313/mbox/",
    "series": [
        {
            "id": 329,
            "url": "https://patchwork.libcamera.org/api/1.1/series/329/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=329",
            "date": "2019-05-27T09:05:53",
            "name": "META_OUTPUT support + IPU3 parameters tuning",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/329/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1313/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1313/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AFD90600EA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 May 2019 11:05:02 +0200 (CEST)",
            "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id F24E46000C;\n\tMon, 27 May 2019 09:05:01 +0000 (UTC)"
        ],
        "X-Originating-IP": "2.224.242.101",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 27 May 2019 11:05:55 +0200",
        "Message-Id": "<20190527090559.26549-3-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190527090559.26549-1-jacopo@jmondi.org>",
        "References": "<20190527090559.26549-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 2/6] libcamera: v4l2_device: Add\n\tsupport for META_OUTPUT",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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, 27 May 2019 09:05:03 -0000"
    },
    "content": "Add support for output devices that expose the META_OUTPUT capabilities.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/include/v4l2_device.h | 10 ++++++++--\n src/libcamera/v4l2_device.cpp       |  9 +++++++++\n 2 files changed, 17 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\nindex 2e7bd1e7f4cc..cecafa151caa 100644\n--- a/src/libcamera/include/v4l2_device.h\n+++ b/src/libcamera/include/v4l2_device.h\n@@ -59,7 +59,8 @@ struct V4L2Capability final : v4l2_capability {\n \tbool isOutput() const\n \t{\n \t\treturn device_caps() & (V4L2_CAP_VIDEO_OUTPUT |\n-\t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT_MPLANE);\n+\t\t\t\t\tV4L2_CAP_VIDEO_OUTPUT_MPLANE |\n+\t\t\t\t\tV4L2_CAP_META_OUTPUT);\n \t}\n \tbool isVideo() const\n \t{\n@@ -70,7 +71,8 @@ struct V4L2Capability final : v4l2_capability {\n \t}\n \tbool isMeta() const\n \t{\n-\t\treturn device_caps() & V4L2_CAP_META_CAPTURE;\n+\t\treturn device_caps() & (V4L2_CAP_META_CAPTURE |\n+\t\t\t\t\tV4L2_CAP_META_OUTPUT);\n \t}\n \tbool isVideoCapture() const\n \t{\n@@ -84,6 +86,10 @@ struct V4L2Capability final : v4l2_capability {\n \t{\n \t\treturn isMeta() && isCapture();\n \t}\n+\tbool isMetaOutput() const\n+\t{\n+\t\treturn isMeta() && isOutput();\n+\t}\n \tbool hasStreaming() const\n \t{\n \t\treturn device_caps() & V4L2_CAP_STREAMING;\ndiff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 8366ffc4db55..e42f6ef0c340 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -116,6 +116,12 @@ LOG_DEFINE_CATEGORY(V4L2)\n  * \\return True if the device can capture image meta-data\n  */\n \n+/**\n+ * \\fn V4L2Capability::isMetaOutput()\n+ * \\brief Identify if the device outputs image meta-data\n+ * \\return True if the device can output image meta-data\n+ */\n+\n /**\n  * \\fn V4L2Capability::hasStreaming()\n  * \\brief Determine if the device can perform Streaming I/O\n@@ -348,6 +354,9 @@ int V4L2Device::open()\n \t} else if (caps_.isMetaCapture()) {\n \t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Read);\n \t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n+\t} else if (caps_.isMetaOutput()) {\n+\t\tfdEvent_ = new EventNotifier(fd_, EventNotifier::Write);\n+\t\tbufferType_ = V4L2_BUF_TYPE_META_OUTPUT;\n \t} else {\n \t\tLOG(V4L2, Error) << \"Device is not a supported type\";\n \t\treturn -EINVAL;\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "2/6"
    ]
}