summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline_handler.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-14 16:14:27 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-18 19:15:18 +0200
commit33fedea818e2b6a9ed68ac86acf194b1a2da8828 (patch)
treeb350f4bc1710775cfe82af3bd7b1f36ce9ee5d2a /src/libcamera/pipeline_handler.cpp
parent9da27d5d844fa1378a4897a637c45ade275cc7e5 (diff)
libcamera: pipeline_handler: Fold buffer management with start/stop
There's no need anymore to have the Camera object control how and when pipeline handlers allocate and free the buffers for the application-facing video devices. Fold those operations, currently performed by importFrameBuffers() and freeFrameBuffers(), into the start() and stop() functions. This simplifies the pipeline handler API, its implementation, and the implementation of the Camera class. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/pipeline_handler.cpp')
-rw-r--r--src/libcamera/pipeline_handler.cpp41
1 files changed, 1 insertions, 40 deletions
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index e5034c54..254d341f 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -325,7 +325,7 @@ const ControlList &PipelineHandler::properties(Camera *camera)
/**
* \fn PipelineHandler::exportFrameBuffers()
- * \brief Allocate buffers for \a stream
+ * \brief Allocate and export buffers for \a stream
* \param[in] camera The camera
* \param[in] stream The stream to allocate buffers for
* \param[out] buffers Array of buffers successfully allocated
@@ -348,45 +348,6 @@ const ControlList &PipelineHandler::properties(Camera *camera)
*/
/**
- * \fn PipelineHandler::importFrameBuffers()
- * \brief Prepare \a stream to use external buffers
- * \param[in] camera The camera
- * \param[in] stream The stream to prepare for import
- *
- * This method prepares the pipeline handler to use buffers provided by the
- * application for the \a stream.
- *
- * The method may only be called after the Camera has been configured and before
- * it gets started, or after it gets stopped. It shall be called only for
- * streams that are part of the active camera configuration, and at most once
- * per stream until buffers for the stream are freed with freeFrameBuffers().
- *
- * importFrameBuffers() shall also allocate all other resources required by the
- * pipeline handler for the stream to prepare for starting the Camera.
- *
- * The only intended caller is Camera::start().
- *
- * \context This function is called from the CameraManager thread.
- *
- * \return 0 on success or a negative error code otherwise
- */
-
-/**
- * \fn PipelineHandler::freeFrameBuffers()
- * \brief Free buffers allocated from the stream
- * \param[in] camera The camera
- * \param[in] stream The stream to free buffers for
- *
- * This method shall release all resources allocated for the \a stream by
- * importFrameBuffers(). It shall be called only after a successful call that
- * method, and only once per stream.
- *
- * The only intended callers are Camera::stop() and Camera::freeFrameBuffers().
- *
- * \context This function is called from the CameraManager thread.
- */
-
-/**
* \fn PipelineHandler::start()
* \brief Start capturing from a group of streams
* \param[in] camera The camera to start