From 4866bf6fe7e080b6b7f0842353d2383a3273f1c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Fri, 1 May 2020 16:10:20 +0200 Subject: libcamera: stream: Expose stride value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expose the image stride which may be retrieved after a video device has been configured. It may only be retrieved at that point as the assignment of video devices takes place at this point. In the future video devices should be assigned at configuration validation time and the stride value retrieved at that point. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/libcamera/stream.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/libcamera/stream.cpp') diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp index ef16aaa1..86c0b17d 100644 --- a/src/libcamera/stream.cpp +++ b/src/libcamera/stream.cpp @@ -301,6 +301,19 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats) * \brief Stream pixel format */ +/** + * \var StreamConfiguration::stride + * \brief Image stride for the stream, in bytes + * + * The stride value reports the number of bytes between the beginning of + * successive lines in an image buffer for this stream. The value is + * valid after successfully configuring the camera with this + * configuration with a call to Camera::Configure(). + * + * \todo Update this value when configuration is validated instead of when + * the camera is configured. + */ + /** * \var StreamConfiguration::bufferCount * \brief Requested number of buffers to allocate for the stream -- cgit v1.2.1