[libcamera-devel] [PATCH 24/30] libcamera: stream: Make FrameBuffer support mandatory
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sun Dec 15 02:53:52 CET 2019
Hi Niklas,
Thank you for the patch.
On Mon, Dec 02, 2019 at 01:20:57PM +0100, Jacopo Mondi wrote:
> On Wed, Nov 27, 2019 at 12:36:14AM +0100, Niklas Söderlund wrote:
> > All pipelines now uses V4L2Streams, make using a sub-class of Stream
s/V4L2Streams/V4L2Stream/
> > which implements the FrameBuffer interface helpers mandatory. Remove the
"make the implementation of the FrameBuffer-related interface of the
Stream class mandatory."
> > fallback implementations in the Stream base class to prevent the base
> > class to be instantiated directly.
You could drop the second sentence.
> > Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
>
> Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
And
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > ---
> > include/libcamera/stream.h | 12 ++++--------
> > 1 file changed, 4 insertions(+), 8 deletions(-)
> >
> > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
> > index 395148e45d342d92..a3c692c347340382 100644
> > --- a/include/libcamera/stream.h
> > +++ b/include/libcamera/stream.h
> > @@ -7,7 +7,6 @@
> > #ifndef __LIBCAMERA_STREAM_H__
> > #define __LIBCAMERA_STREAM_H__
> >
> > -#include <errno.h>
> > #include <map>
> > #include <memory>
> > #include <string>
> > @@ -89,13 +88,10 @@ protected:
> > friend class Camera;
> >
> > virtual int allocateBuffers(const StreamConfiguration &config,
> > - std::vector<FrameBuffer *> *buffers)
> > - {
> > - return -EINVAL;
> > - }
> > - virtual void releaseBuffers() { return; }
> > - virtual int start() { return -EINVAL; }
> > - virtual void stop() { return; }
> > + std::vector<FrameBuffer *> *buffers) = 0;
> > + virtual void releaseBuffers() = 0;
> > + virtual int start() = 0;
> > + virtual void stop() = 0;
> >
> > int mapBuffer(const Buffer *buffer);
> > void unmapBuffer(const Buffer *buffer);
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list