From 1d7b6297f2ff01c71ebc44788d25545caa6e84e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Tue, 5 Feb 2019 12:52:51 +0100 Subject: libcamera: stream: Add stream configuration to the stream object MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a cache of the active stream configuration to the stream object. This cache is to be updated from the Camera object and can be accessed read only from both the application and pipeline handlers. Signed-off-by: Niklas Söderlund Signed-off-by: Jacopo Mondi Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart --- include/libcamera/stream.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h index 111f2c93..3e8e83a2 100644 --- a/include/libcamera/stream.h +++ b/include/libcamera/stream.h @@ -11,23 +11,31 @@ namespace libcamera { +class Camera; + +struct StreamConfiguration { + unsigned int width; + unsigned int height; + unsigned int pixelFormat; + + unsigned int bufferCount; +}; + class Stream final { public: Stream(); BufferPool &bufferPool() { return bufferPool_; } + const StreamConfiguration &configuration() const { return configuration_; } private: + friend Camera; + BufferPool bufferPool_; + StreamConfiguration configuration_; }; -struct StreamConfiguration { - unsigned int width; - unsigned int height; - unsigned int pixelFormat; - unsigned int bufferCount; -}; } /* namespace libcamera */ -- cgit v1.2.1