[{"id":3171,"web_url":"https://patchwork.libcamera.org/comment/3171/","msgid":"<20191202122057.neioweyyez2ad7a2@uno.localdomain>","date":"2019-12-02T12:20:57","subject":"Re: [libcamera-devel] [PATCH 24/30] libcamera: stream: Make\n\tFrameBuffer support mandatory","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Niklas,\n\nOn Wed, Nov 27, 2019 at 12:36:14AM +0100, Niklas Söderlund wrote:\n> All pipelines now uses V4L2Streams, make using a sub-class of Stream\n> which implements the FrameBuffer interface helpers mandatory. Remove the\n> fallback implementations in the Stream base class to prevent the base\n> class to be instantiated directly.\n>\n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\n> ---\n>  include/libcamera/stream.h | 12 ++++--------\n>  1 file changed, 4 insertions(+), 8 deletions(-)\n>\n> diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> index 395148e45d342d92..a3c692c347340382 100644\n> --- a/include/libcamera/stream.h\n> +++ b/include/libcamera/stream.h\n> @@ -7,7 +7,6 @@\n>  #ifndef __LIBCAMERA_STREAM_H__\n>  #define __LIBCAMERA_STREAM_H__\n>\n> -#include <errno.h>\n>  #include <map>\n>  #include <memory>\n>  #include <string>\n> @@ -89,13 +88,10 @@ protected:\n>  \tfriend class Camera;\n>\n>  \tvirtual int allocateBuffers(const StreamConfiguration &config,\n> -\t\t\t\t    std::vector<FrameBuffer *> *buffers)\n> -\t{\n> -\t\treturn -EINVAL;\n> -\t}\n> -\tvirtual void releaseBuffers() { return; }\n> -\tvirtual int start() { return -EINVAL; }\n> -\tvirtual void stop() { return; }\n> +\t\t\t\t    std::vector<FrameBuffer *> *buffers) = 0;\n> +\tvirtual void releaseBuffers() = 0;\n> +\tvirtual int start() = 0;\n> +\tvirtual void stop() = 0;\n>\n>  \tint mapBuffer(const Buffer *buffer);\n>  \tvoid unmapBuffer(const Buffer *buffer);\n> --\n> 2.24.0\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B07E260BC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  2 Dec 2019 13:18:48 +0100 (CET)","from uno.localdomain (93-34-114-233.ip49.fastwebnet.it\n\t[93.34.114.233]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id 2234A100002;\n\tMon,  2 Dec 2019 12:18:47 +0000 (UTC)"],"Date":"Mon, 2 Dec 2019 13:20:57 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191202122057.neioweyyez2ad7a2@uno.localdomain>","References":"<20191126233620.1695316-1-niklas.soderlund@ragnatech.se>\n\t<20191126233620.1695316-25-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"lllteprgnxfegbzg\"","Content-Disposition":"inline","In-Reply-To":"<20191126233620.1695316-25-niklas.soderlund@ragnatech.se>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH 24/30] libcamera: stream: Make\n\tFrameBuffer support mandatory","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, 02 Dec 2019 12:18:48 -0000"}},{"id":3250,"web_url":"https://patchwork.libcamera.org/comment/3250/","msgid":"<20191215015352.GG16015@pendragon.ideasonboard.com>","date":"2019-12-15T01:53:52","subject":"Re: [libcamera-devel] [PATCH 24/30] libcamera: stream: Make\n\tFrameBuffer support mandatory","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Mon, Dec 02, 2019 at 01:20:57PM +0100, Jacopo Mondi wrote:\n> On Wed, Nov 27, 2019 at 12:36:14AM +0100, Niklas Söderlund wrote:\n> > All pipelines now uses V4L2Streams, make using a sub-class of Stream\n\ns/V4L2Streams/V4L2Stream/\n\n> > which implements the FrameBuffer interface helpers mandatory. Remove the\n\n\"make the implementation of the FrameBuffer-related interface of the\nStream class mandatory.\"\n\n> > fallback implementations in the Stream base class to prevent the base\n> > class to be instantiated directly.\n\nYou could drop the second sentence.\n\n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> \n> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nAnd\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> > ---\n> >  include/libcamera/stream.h | 12 ++++--------\n> >  1 file changed, 4 insertions(+), 8 deletions(-)\n> >\n> > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> > index 395148e45d342d92..a3c692c347340382 100644\n> > --- a/include/libcamera/stream.h\n> > +++ b/include/libcamera/stream.h\n> > @@ -7,7 +7,6 @@\n> >  #ifndef __LIBCAMERA_STREAM_H__\n> >  #define __LIBCAMERA_STREAM_H__\n> >\n> > -#include <errno.h>\n> >  #include <map>\n> >  #include <memory>\n> >  #include <string>\n> > @@ -89,13 +88,10 @@ protected:\n> >  \tfriend class Camera;\n> >\n> >  \tvirtual int allocateBuffers(const StreamConfiguration &config,\n> > -\t\t\t\t    std::vector<FrameBuffer *> *buffers)\n> > -\t{\n> > -\t\treturn -EINVAL;\n> > -\t}\n> > -\tvirtual void releaseBuffers() { return; }\n> > -\tvirtual int start() { return -EINVAL; }\n> > -\tvirtual void stop() { return; }\n> > +\t\t\t\t    std::vector<FrameBuffer *> *buffers) = 0;\n> > +\tvirtual void releaseBuffers() = 0;\n> > +\tvirtual int start() = 0;\n> > +\tvirtual void stop() = 0;\n> >\n> >  \tint mapBuffer(const Buffer *buffer);\n> >  \tvoid unmapBuffer(const Buffer *buffer);","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 C59B7601E5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 15 Dec 2019 02:54:02 +0100 (CET)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C19742D1;\n\tSun, 15 Dec 2019 02:54:01 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1576374842;\n\tbh=/fp+6YvuR078gbvhZqDC6cPzwyQD7kW0a/I8wOW3lhU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=RtGppzQRE1GCZEtlIP+rHxMIqihmnV/dMaSXQtS3qCFho/CYPc3n51wSNh0mliuNv\n\taW7CpPeXR+YQy4hlURxBH/WiklczJtGXOf5Eu9H5kgYfxCgkchByoYbzfX8mduyah8\n\tyI5J+rAI8lA8GbcNWIUyz0SNE+Dt/RVSYgAMOc7c=","Date":"Sun, 15 Dec 2019 03:53:52 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"Jacopo Mondi <jacopo@jmondi.org>, libcamera-devel@lists.libcamera.org","Message-ID":"<20191215015352.GG16015@pendragon.ideasonboard.com>","References":"<20191126233620.1695316-1-niklas.soderlund@ragnatech.se>\n\t<20191126233620.1695316-25-niklas.soderlund@ragnatech.se>\n\t<20191202122057.neioweyyez2ad7a2@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20191202122057.neioweyyez2ad7a2@uno.localdomain>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 24/30] libcamera: stream: Make\n\tFrameBuffer support mandatory","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":"Sun, 15 Dec 2019 01:54:03 -0000"}}]