summaryrefslogtreecommitdiff
path: root/src/libcamera/stream.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-05-26 02:31:39 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-06-19 12:24:23 +0200
commita50289642948239722b0f45b2df097df20d43ae9 (patch)
treead729cf9a3bde9305a22fddfc85ba4b2013d16be /src/libcamera/stream.cpp
parent63c578ed9993056dab3bd0774b572cd015747a45 (diff)
libcamera: stream: StreamConfiguration: Add StreamFormats information
Allow StreamFormats to be associated to a StreamConfiguration. The intention is that pipeline handlers should associate formats to a StreamConfiguration when it's created in generateConfiguration(). Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/stream.cpp')
-rw-r--r--src/libcamera/stream.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index 3398c597..d60f8324 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -271,6 +271,23 @@ SizeRange StreamFormats::range(unsigned int pixelformat) const
*/
/**
+ * \todo This method is deprecated and should be removed once all pipeline
+ * handlers provied StreamFormats.
+ */
+StreamConfiguration::StreamConfiguration()
+ : stream_(nullptr)
+{
+}
+
+/**
+ * \brief Construct a configuration with stream formats
+ */
+StreamConfiguration::StreamConfiguration(const StreamFormats &formats)
+ : stream_(nullptr), formats_(formats)
+{
+}
+
+/**
* \var StreamConfiguration::size
* \brief Stream size in pixels
*/
@@ -311,6 +328,18 @@ SizeRange StreamFormats::range(unsigned int pixelformat) const
*/
/**
+ * \fn StreamConfiguration::formats()
+ * \brief Retrieve advisory stream format information
+ *
+ * This method retrieves information about the pixel formats and sizes supported
+ * by the stream configuration. The sizes are advisory and not all of them are
+ * guaranteed to be supported by the stream. Users shall always inspect the size
+ * in the stream configuration after calling CameraConfiguration::validate().
+ *
+ * \return Stream formats information
+ */
+
+/**
* \brief Assemble and return a string describing the configuration
*
* \return A string describing the StreamConfiguration