summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2020-07-04 17:49:33 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2020-07-10 16:11:05 +0900
commit8addae2583d68aaa4e904d7607b1d94ddc371860 (patch)
tree358b6baa5f71da32048a01d2dca5b9a594756c5b /src
parentfad0314bc909cf74444ef97b74b2a933a194e986 (diff)
libcamera: StreamConfiguration: Add frameSize field
In addition to the stride field, we want the pipeline handler to be able to declare the frame size for the configuration. Add a frameSize field to StreamConfiguration for this purpose. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/stream.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index 6df5882f..a3c015fe 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -279,7 +279,8 @@ SizeRange StreamFormats::range(const PixelFormat &pixelformat) const
* handlers provide StreamFormats.
*/
StreamConfiguration::StreamConfiguration()
- : pixelFormat(0), stride(0), bufferCount(0), stream_(nullptr)
+ : pixelFormat(0), stride(0), frameSize(0), bufferCount(0),
+ stream_(nullptr)
{
}
@@ -287,8 +288,8 @@ StreamConfiguration::StreamConfiguration()
* \brief Construct a configuration with stream formats
*/
StreamConfiguration::StreamConfiguration(const StreamFormats &formats)
- : pixelFormat(0), stride(0), bufferCount(0), stream_(nullptr),
- formats_(formats)
+ : pixelFormat(0), stride(0), frameSize(0), bufferCount(0),
+ stream_(nullptr), formats_(formats)
{
}
@@ -316,6 +317,16 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)
*/
/**
+ * \var StreamConfiguration::frameSize
+ * \brief Frame size for the stream, in bytes
+ *
+ * The frameSize value reports the number of bytes necessary to contain one
+ * frame of an image buffer for this stream. This total includes the bytes
+ * required for all image planes. The value is valid after successfully
+ * validating the configuration with a call to CameraConfiguration::validate().
+ */
+
+/**
* \var StreamConfiguration::bufferCount
* \brief Requested number of buffers to allocate for the stream
*/