summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline_handler.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-01-26 21:19:57 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-02-01 08:11:48 +0100
commit0d913813b53564e83980f53204bb517095c866f9 (patch)
treef447aaaba0184faa1597a71d60fe87ba41628318 /src/libcamera/pipeline_handler.cpp
parent75476f86d2eb5074e3e6713b193f7a31a6b8ac52 (diff)
libcamera: pipeline: extend pipelines to support stream configuration
All streams which are to be used for capture need to be configured at the same time. This allows the pipeline handler to take any dependencies between the different streams and their configuration into account when setting up the hardware. Extend the pipeline API and all pipeline implementations with two new functions, one to read a default configuration and one to set a new configuration. Both functions operate on a group of streams which the pipeline handler should consider when performing the operations. In the current implemented pipelines this is rather easy as they only have one stream each per camera. Furthermore as there is yet no way for the pipeline handlers to interact with the hardware all they do is return a null format, log that a default configuration has been requested and log that a new configuration has been set. Future work based on more components are needed to make the pipelines return a good default format and actually interact with the hardware. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline_handler.cpp')
-rw-r--r--src/libcamera/pipeline_handler.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index 1c864079..3a560e10 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -75,6 +75,40 @@ PipelineHandler::~PipelineHandler()
{
};
+
+/**
+ * \fn PipelineHandler::streamConfiguration()
+ * \brief Retrieve a group of stream configurations for a specified camera
+ * \param[in] camera The camera to fetch default configuration from
+ * \param[in] streams An array of streams to fetch information about
+ *
+ * Retrieve the species camera's default configuration for a specified group of
+ * streams. The caller shall populate the \a streams array with the streams it
+ * wish to fetch the configuration from. The map of streams and configuration
+ * returned can then be examined by the caller to learn about the defualt
+ * parameters for the specified streams.
+ *
+ * The intended companion to this is \a configureStreams() which can be used to
+ * change the group of streams parameters.
+ *
+ * \return A map of successfully retrieved streams and configurations or an
+ * empty map on error.
+ */
+
+/**
+ * \fn PipelineHandler::configureStreams()
+ * \brief Configure a group of streams for capture
+ * \param[in] camera The camera to configure
+ * \param[in] config A map of stream configurations to apply
+ *
+ * Configure the specified group of streams for \a camera according to the
+ * configuration specified in \a configs. The intended caller of this interface
+ * is the Camera class which will receive configuration to apply from the
+ * application.
+ *
+ * \return 0 on success or a negative error code on error.
+ */
+
/**
* \fn PipelineHandler::match(DeviceEnumerator *enumerator)
* \brief Match media devices and create camera instances