[libcamera-devel] [PATCH v7 1/8] libcamera: stream: Make Stream inheritable

Jacopo Mondi jacopo at jmondi.org
Wed Apr 17 15:58:51 CEST 2019


In preparation for multiple streams support prepare to allow sub-classing
the Stream class by removing the 'final' specifier from the class
definition and make its private members protected.

Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
 include/libcamera/stream.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
index d0f7b0e12485..8a47930f8614 100644
--- a/include/libcamera/stream.h
+++ b/include/libcamera/stream.h
@@ -43,7 +43,7 @@ private:
 	Size size_;
 };
 
-class Stream final
+class Stream
 {
 public:
 	class StillCapture : public StreamUsage
@@ -68,7 +68,7 @@ public:
 	BufferPool &bufferPool() { return bufferPool_; }
 	const StreamConfiguration &configuration() const { return configuration_; }
 
-private:
+protected:
 	friend class Camera;
 
 	BufferPool bufferPool_;
-- 
2.21.0



More information about the libcamera-devel mailing list