Patch Detail
Show a patch.
GET /api/1.1/patches/587/?format=api
{ "id": 587, "url": "https://patchwork.libcamera.org/api/1.1/patches/587/?format=api", "web_url": "https://patchwork.libcamera.org/patch/587/", "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": "<20190219165620.2385-4-jacopo@jmondi.org>", "date": "2019-02-19T16:56:20", "name": "[libcamera-devel,3/3] libcamera: v4l2_device: Add support for META_CAPTURE devices", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "7aa1027c0fc5ac25f41b828ded19fde0e7e1858b", "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/587/mbox/", "series": [ { "id": 185, "url": "https://patchwork.libcamera.org/api/1.1/series/185/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=185", "date": "2019-02-19T16:56:17", "name": "libcamera: v4l2_subdev and v4l2_device mixed", "version": 1, "mbox": "https://patchwork.libcamera.org/series/185/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/587/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/587/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DA5BE601E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Feb 2019 17:56:03 +0100 (CET)", "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 6B014E0009;\n\tTue, 19 Feb 2019 16:56:03 +0000 (UTC)" ], "X-Originating-IP": "2.224.242.101", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 19 Feb 2019 17:56:20 +0100", "Message-Id": "<20190219165620.2385-4-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190219165620.2385-1-jacopo@jmondi.org>", "References": "<20190219165620.2385-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 3/3] libcamera: v4l2_device: Add support\n\tfor META_CAPTURE devices", "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": "Tue, 19 Feb 2019 16:56:04 -0000" }, "content": "Add support for devices that provides video meta-data to v4l2_device.cpp\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/include/v4l2_device.h | 4 ++++\n src/libcamera/v4l2_device.cpp | 12 ++++++++++--\n 2 files changed, 14 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\nindex 1d31d1b403bc..52eb6785cc15 100644\n--- a/src/libcamera/include/v4l2_device.h\n+++ b/src/libcamera/include/v4l2_device.h\n@@ -53,6 +53,10 @@ struct V4L2Capability final : v4l2_capability {\n \t\treturn device_caps() & (V4L2_CAP_VIDEO_CAPTURE |\n \t\t\t\t\tV4L2_CAP_VIDEO_CAPTURE_MPLANE);\n \t}\n+\tbool isMeta() const\n+\t{\n+\t\treturn device_caps() & V4L2_CAP_META_CAPTURE;\n+\t}\n \tbool isOutput() const\n \t{\n \t\treturn device_caps() & (V4L2_CAP_VIDEO_OUTPUT |\ndiff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 24e115554a99..7fe6476bf035 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -79,6 +79,12 @@ LOG_DEFINE_CATEGORY(V4L2)\n * \\return True if the device can output video frames\n */\n \n+/**\n+ * \\fn bool V4L2Capability::isMeta()\n+ * \\brief Identify if the device is capable of providing video meta-data\n+ * \\return True if the device can provide video meta-data\n+ */\n+\n /**\n * \\fn bool V4L2Capability::hasStreaming()\n * \\brief Determine if the device can perform Streaming I/O\n@@ -280,7 +286,7 @@ int V4L2Device::open()\n \t\t<< \"Opened device \" << caps_.bus_info() << \": \"\n \t\t<< caps_.driver() << \": \" << caps_.card();\n \n-\tif (!caps_.isCapture() && !caps_.isOutput()) {\n+\tif (!caps_.isCapture() && !caps_.isOutput() && !caps_.isMeta()) {\n \t\tLOG(V4L2, Debug) << \"Device is not a supported type\";\n \t\treturn -EINVAL;\n \t}\n@@ -294,10 +300,12 @@ int V4L2Device::open()\n \t\tbufferType_ = caps_.isMultiplanar()\n \t\t\t ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE\n \t\t\t : V4L2_BUF_TYPE_VIDEO_CAPTURE;\n-\telse\n+\telse if (caps_.isOutput())\n \t\tbufferType_ = caps_.isMultiplanar()\n \t\t\t ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE\n \t\t\t : V4L2_BUF_TYPE_VIDEO_OUTPUT;\n+\telse\n+\t\tbufferType_ = V4L2_BUF_TYPE_META_CAPTURE;\n \n \t/*\n \t * We wait for Read notifications on CAPTURE devices (POLLIN), and\n", "prefixes": [ "libcamera-devel", "3/3" ] }