summaryrefslogtreecommitdiff
path: root/include/libcamera/stream.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-02-05 12:52:51 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-02-06 07:41:51 +0200
commit1d7b6297f2ff01c71ebc44788d25545caa6e84e3 (patch)
tree76d80fb428510e43480631dd1d0ca7742ba30327 /include/libcamera/stream.h
parent1b7051b4929786728c741aa358360b8ab0e2fad7 (diff)
libcamera: stream: Add stream configuration to the stream object
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 <niklas.soderlund@ragnatech.se> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include/libcamera/stream.h')
-rw-r--r--include/libcamera/stream.h20
1 files changed, 14 insertions, 6 deletions
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 */