{"id":3214,"url":"https://patchwork.libcamera.org/api/1.1/patches/3214/?format=json","web_url":"https://patchwork.libcamera.org/patch/3214/","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":"<20200320014839.14683-7-laurent.pinchart@ideasonboard.com>","date":"2020-03-20T01:48:34","name":"[libcamera-devel,v3,06/11] libcamera: v4l2_videodevice: Expose the device capabilities","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"e9d40b88e1db0eb8306f41fd93aa30905b8d6a00","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/3214/mbox/","series":[{"id":749,"url":"https://patchwork.libcamera.org/api/1.1/series/749/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=749","date":"2020-03-20T01:48:28","name":"Simple pipeline handler","version":3,"mbox":"https://patchwork.libcamera.org/series/749/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3214/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3214/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 DC4AA62BA9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Mar 2020 02:48:54 +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 475C61817;\n\tFri, 20 Mar 2020 02:48:54 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584668934;\n\tbh=q9yrVXwiINzz4e6bWOMUEh1qii5MhecNeXx9MiEhH8k=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=POYy1WRc7pYym+l4Hxvu00jpjGfaUAElSfi6BbTwpMRe7StfplB1OF4N0TESzoJ3G\n\tXecg/STzXUFH9WNA6sM4eQNWdEw6Vc1tLAbxTr8krujMC9OCpswLJAbGCQRwv3aDZq\n\tDOgAZYiX/Gb+UWspahoQNMCFVYWHWksfIkodrRKk=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Martijn Braam <martijn@brixit.nl>,\n\tBenjamin GAIGNARD <benjamin.gaignard@st.com>,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","Date":"Fri, 20 Mar 2020 03:48:34 +0200","Message-Id":"<20200320014839.14683-7-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.24.1","In-Reply-To":"<20200320014839.14683-1-laurent.pinchart@ideasonboard.com>","References":"<20200320014839.14683-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 06/11] 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":"Fri, 20 Mar 2020 01:48:55 -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>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\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 7b011d3b4e87..84d8d433b0ad 100644\n--- a/src/libcamera/include/v4l2_videodevice.h\n+++ b/src/libcamera/include/v4l2_videodevice.h\n@@ -205,6 +205,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 \tstd::map<V4L2PixelFormat, std::vector<SizeRange>> formats(uint32_t code = 0);\ndiff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex c11936fa2d5a..096ebc1bbb88 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -745,6 +745,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","v3","06/11"]}