summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-02-04 17:18:09 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-02-04 20:21:19 +0100
commit4a5febd7ddd798c783ca5e1192b0e9c705c1ac77 (patch)
treeee405a813cdf2aea87ba16544e0bbf1d0f39829e
parent08c31d2a868656fb967618957fdf9e122422606e (diff)
libcamera: streams: extend stream configuration with buffer count
The camera needs to be configured with the number of buffers required to satisfy the applications use case. While the application can request any number of buffers, the pipeline must take the constraints of the Linux driver into consideration. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--include/libcamera/stream.h2
-rw-r--r--src/libcamera/stream.cpp5
2 files changed, 7 insertions, 0 deletions
diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
index 4b24dd84..89067836 100644
--- a/include/libcamera/stream.h
+++ b/include/libcamera/stream.h
@@ -17,6 +17,8 @@ struct StreamConfiguration {
unsigned int width;
unsigned int height;
unsigned int pixelFormat;
+
+ unsigned int bufferCount;
};
} /* namespace libcamera */
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index b0b4efe3..dd9092d9 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -73,4 +73,9 @@ namespace libcamera {
* format described in V4L2 using the V4L2_PIX_FMT_* definitions.
*/
+/**
+ * \var StreamConfiguration::bufferCount
+ * \brief Requested number of buffers to allocate for the stream
+ */
+
} /* namespace libcamera */