[libcamera-devel] [PATCH 24/30] libcamera: stream: Make FrameBuffer support mandatory
Niklas Söderlund
niklas.soderlund at ragnatech.se
Wed Nov 27 00:36:14 CET 2019
All pipelines now uses V4L2Streams, make using a sub-class of Stream
which implements the FrameBuffer interface helpers mandatory. Remove the
fallback implementations in the Stream base class to prevent the base
class to be instantiated directly.
Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
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);
--
2.24.0
More information about the libcamera-devel
mailing list