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 --- src/libcamera/stream.cpp | 62 ++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 28 deletions(-) (limited to 'src/libcamera/stream.cpp') diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp index b6238946..c4943c91 100644 --- a/src/libcamera/stream.cpp +++ b/src/libcamera/stream.cpp @@ -29,6 +29,37 @@ namespace libcamera { +/** + * \struct StreamConfiguration + * \brief Configuration parameters for a stream + * + * The StreamConfiguration structure models all information which can be + * configured for a single video stream. + */ + +/** + * \var StreamConfiguration::width + * \brief Stream width in pixels + */ + +/** + * \var StreamConfiguration::height + * \brief Stream height in pixels + */ + +/** + * \var StreamConfiguration::pixelFormat + * \brief Stream pixel format + * + * This is a little endian four character code representation of the pixel + * format described in V4L2 using the V4L2_PIX_FMT_* definitions. + */ + +/** + * \var StreamConfiguration::bufferCount + * \brief Requested number of buffers to allocate for the stream + */ + /** * \class Stream * \brief Video stream for a camera @@ -66,34 +97,9 @@ Stream::Stream() */ /** - * \struct StreamConfiguration - * \brief Configuration parameters for a stream - * - * The StreamConfiguration structure models all information which can be - * configured for a single video stream. - */ - -/** - * \var StreamConfiguration::width - * \brief Stream width in pixels - */ - -/** - * \var StreamConfiguration::height - * \brief Stream height in pixels - */ - -/** - * \var StreamConfiguration::pixelFormat - * \brief Stream pixel format - * - * This is a little endian four character code representation of the pixel - * format described in V4L2 using the V4L2_PIX_FMT_* definitions. - */ - -/** - * \var StreamConfiguration::bufferCount - * \brief Requested number of buffers to allocate for the stream + * \fn Stream::configuration() + * \brief Retrieve the active configuration of the stream + * \return The active configuration of the stream */ } /* namespace libcamera */ -- cgit v1.2.1