{"id":3122,"url":"https://patchwork.libcamera.org/api/1.1/patches/3122/?format=json","web_url":"https://patchwork.libcamera.org/patch/3122/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200316214310.27665-6-laurent.pinchart@ideasonboard.com>","date":"2020-03-16T21:43:05","name":"[libcamera-devel,v2,05/10] libcamera: v4l2_videodevice: Expose the device capabilities","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"8ba4faad1f5760d5a1783609993c80cbdd19d03f","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/3122/mbox/","series":[{"id":724,"url":"https://patchwork.libcamera.org/api/1.1/series/724/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=724","date":"2020-03-16T21:43:00","name":"Simple pipeline handler","version":2,"mbox":"https://patchwork.libcamera.org/series/724/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3122/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3122/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 927AA62928\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 16 Mar 2020 22:43:25 +0100 (CET)","from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E73151414;\n\tMon, 16 Mar 2020 22:43:23 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584395005;\n\tbh=oSPvaRvnGMjupYnjHIiXCmNYyNgKsUMDtpXeaTLY+pw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=mdoS9ImYus5FsH36IFhxF9PMTPKwyi6ValaaCnwV6J8x/3f7HyHn2AxDXINFeIp4E\n\trps/e5steJghYZxP4MhbqBy7YcI0GI1TEbCH4WHuWZ963jwrKey6Eob9ljx7BIb3K2\n\tFGNegiZrOOTV6fy9bQJWYGLOMQ+LKrr8BQ7PZM8A=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Martijn Braam <martijn@brixit.nl>, Mickael GUENE <mickael.guene@st.com>, \n\tBenjamin GAIGNARD <benjamin.gaignard@st.com>,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","Date":"Mon, 16 Mar 2020 23:43:05 +0200","Message-Id":"<20200316214310.27665-6-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.24.1","In-Reply-To":"<20200316214310.27665-1-laurent.pinchart@ideasonboard.com>","References":"<20200316214310.27665-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 05/10] libcamera: v4l2_videodevice:\n\tExpose the device capabilities","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, 16 Mar 2020 21:43:25 -0000"},"content":"Add a caps() function that exposes the V4L2 capabilities for the device.\nThis is useful for generic code that can't hardcode any a priori\nknowledge of the device, such as in a simple pipeline handler.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/include/v4l2_videodevice.h | 2 ++\n src/libcamera/v4l2_videodevice.cpp       | 6 ++++++\n 2 files changed, 8 insertions(+)","diff":"diff --git a/src/libcamera/include/v4l2_videodevice.h b/src/libcamera/include/v4l2_videodevice.h\nindex 7196cabd09c7..16fc6b60de02 100644\n--- a/src/libcamera/include/v4l2_videodevice.h\n+++ b/src/libcamera/include/v4l2_videodevice.h\n@@ -182,6 +182,8 @@ public:\n \tconst char *deviceName() const { return caps_.card(); }\n \tconst char *busName() const { return caps_.bus_info(); }\n \n+\tconst V4L2Capability &caps() const { return caps_; }\n+\n \tint getFormat(V4L2DeviceFormat *format);\n \tint setFormat(V4L2DeviceFormat *format);\n \tImageFormats formats(uint32_t code = 0);\ndiff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 084394fa5380..f5a925d97b63 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -682,6 +682,12 @@ void V4L2VideoDevice::close()\n  * \\return The string containing the device location\n  */\n \n+/**\n+ * \\fn V4L2VideoDevice::caps()\n+ * \\brief Retrieve the device V4L2 capabilities\n+ * \\return The device V4L2 capabilities\n+ */\n+\n std::string V4L2VideoDevice::logPrefix() const\n {\n \treturn deviceNode() + (V4L2_TYPE_IS_OUTPUT(bufferType_) ? \"[out]\" : \"[cap]\");\n","prefixes":["libcamera-devel","v2","05/10"]}