[{"id":974,"web_url":"https://patchwork.libcamera.org/comment/974/","msgid":"<20190228221856.GQ7811@pendragon.ideasonboard.com>","date":"2019-02-28T22:18:56","subject":"Re: [libcamera-devel] [PATCH v5 6/9] libcamera: v4l2_device: Expose\n\tthe device node path","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Thu, Feb 28, 2019 at 09:01:48PM +0100, Jacopo Mondi wrote:\n> Provide a getter method to access the device node path. For video\n> devices it is usually the most informative description.\n\nThis looks fine, but do you use it anywhere ?\n\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/include/v4l2_device.h | 1 +\n>  src/libcamera/v4l2_device.cpp       | 6 ++++++\n>  2 files changed, 7 insertions(+)\n> \n> diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n> index 733bd69959f3..e1f79e730ec5 100644\n> --- a/src/libcamera/include/v4l2_device.h\n> +++ b/src/libcamera/include/v4l2_device.h\n> @@ -99,6 +99,7 @@ public:\n>  \tconst char *driverName() const { return caps_.driver(); }\n>  \tconst char *deviceName() const { return caps_.card(); }\n>  \tconst char *busName() const { return caps_.bus_info(); }\n> +\tconst std::string deviceNode() const { return deviceNode_; }\n\nDid you mean const std::string &devicenode() const ?\n\n>  \n>  \tint getFormat(V4L2DeviceFormat *format);\n>  \tint setFormat(V4L2DeviceFormat *format);\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 9bfa10e8a151..b498d4e0bf92 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -364,6 +364,12 @@ void V4L2Device::close()\n>   * \\return The string containing the device location\n>   */\n>  \n> +/**\n> + * \\fn const std::string V4L2Device::deviceNode()\n\nYou don't have to set the return type.\n\n> + * \\brief Retrieve the video device node path\n> + * \\return The video device deviceNode path\n> + */\n> +\n>  std::string V4L2Device::logPrefix() const\n>  {\n>  \treturn deviceNode_;","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 42CCD610B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Feb 2019 23:19:02 +0100 (CET)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BA6A049;\n\tThu, 28 Feb 2019 23:19:01 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1551392341;\n\tbh=jZ1Eyr7JuSYSiCdrAgdV7sNpW6D2zHex1sxhBDWNmBE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=j1f7h3J+mHhBeFP46e0/sw0/WZI28zDd0h66rACdycADB1J9uW2Bael5p8oplYNs2\n\tzcjn5uLOnJLOPNro+cxrypxwv+u0563c8QlBSkvTo6yDTCnTJ3c0QmDRbC0q2u07mz\n\tqo6htP2Q0bHfvOAkGGJ9kFGvMkvnWN96+19FVq9I=","Date":"Fri, 1 Mar 2019 00:18:56 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190228221856.GQ7811@pendragon.ideasonboard.com>","References":"<20190228200151.2948-1-jacopo@jmondi.org>\n\t<20190228200151.2948-7-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190228200151.2948-7-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v5 6/9] libcamera: v4l2_device: Expose\n\tthe device node path","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":"Thu, 28 Feb 2019 22:19:02 -0000"}},{"id":980,"web_url":"https://patchwork.libcamera.org/comment/980/","msgid":"<20190301091929.cxv7vlsxd3hbuf7c@uno.localdomain>","date":"2019-03-01T09:19:29","subject":"Re: [libcamera-devel] [PATCH v5 6/9] libcamera: v4l2_device: Expose\n\tthe device node path","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Fri, Mar 01, 2019 at 12:18:56AM +0200, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> Thank you for the patch.\n>\n> On Thu, Feb 28, 2019 at 09:01:48PM +0100, Jacopo Mondi wrote:\n> > Provide a getter method to access the device node path. For video\n> > devices it is usually the most informative description.\n>\n> This looks fine, but do you use it anywhere ?\n\nIn IPU3 patches, I find it more informative for video devices to\nprint the devnode path instead of the driver name (while for\nsubdevices I think the entity name is the most informative one, see\ndiscussion on v1 with Niklas and Kieran)\n\n>\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  src/libcamera/include/v4l2_device.h | 1 +\n> >  src/libcamera/v4l2_device.cpp       | 6 ++++++\n> >  2 files changed, 7 insertions(+)\n> >\n> > diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\n> > index 733bd69959f3..e1f79e730ec5 100644\n> > --- a/src/libcamera/include/v4l2_device.h\n> > +++ b/src/libcamera/include/v4l2_device.h\n> > @@ -99,6 +99,7 @@ public:\n> >  \tconst char *driverName() const { return caps_.driver(); }\n> >  \tconst char *deviceName() const { return caps_.card(); }\n> >  \tconst char *busName() const { return caps_.bus_info(); }\n> > +\tconst std::string deviceNode() const { return deviceNode_; }\n>\n> Did you mean const std::string &devicenode() const ?\n>\n\nArgh, this was trivial, I'm sorry\n\n> >\n> >  \tint getFormat(V4L2DeviceFormat *format);\n> >  \tint setFormat(V4L2DeviceFormat *format);\n> > diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> > index 9bfa10e8a151..b498d4e0bf92 100644\n> > --- a/src/libcamera/v4l2_device.cpp\n> > +++ b/src/libcamera/v4l2_device.cpp\n> > @@ -364,6 +364,12 @@ void V4L2Device::close()\n> >   * \\return The string containing the device location\n> >   */\n> >\n> > +/**\n> > + * \\fn const std::string V4L2Device::deviceNode()\n>\n> You don't have to set the return type.\n\nIndeed\n\n>\n> > + * \\brief Retrieve the video device node path\n> > + * \\return The video device deviceNode path\n\ndeviceNode here should probably be \"device node\"\n\nThanks\n  j\n\n> > + */\n> > +\n> >  std::string V4L2Device::logPrefix() const\n> >  {\n> >  \treturn deviceNode_;\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net\n\t[217.70.183.201])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 604A8610B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  1 Mar 2019 10:19:00 +0100 (CET)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay8-d.mail.gandi.net (Postfix) with ESMTPSA id D8D541BF219;\n\tFri,  1 Mar 2019 09:18:59 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Fri, 1 Mar 2019 10:19:29 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190301091929.cxv7vlsxd3hbuf7c@uno.localdomain>","References":"<20190228200151.2948-1-jacopo@jmondi.org>\n\t<20190228200151.2948-7-jacopo@jmondi.org>\n\t<20190228221856.GQ7811@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"hpvfodn6o7vy7rck\"","Content-Disposition":"inline","In-Reply-To":"<20190228221856.GQ7811@pendragon.ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH v5 6/9] libcamera: v4l2_device: Expose\n\tthe device node path","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":"Fri, 01 Mar 2019 09:19:00 -0000"}}]