summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline_handler.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-01-03 13:10:37 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-01-21 11:13:49 +0200
commitf3695e9b09ce4a88d6e0480d9e5058673af34a49 (patch)
tree804d52f7b54c2add621f317fd13529d1d27bb17b /src/libcamera/pipeline_handler.cpp
parent32bf7ef239c1310fba638f35046b0f7eb13b32bf (diff)
libcamera: camera_manager: Register cameras with the camera manager
Cameras are listed through a double indirection, first iterating over all available pipeline handlers, and then listing the cameras they each support. To simplify the API make the pipeline handlers register the cameras with the camera manager directly, which lets the camera manager easily expose the list of all available cameras. The PipelineHandler API gets simplified as the handlers don't need to expose the list of cameras they have created. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/pipeline_handler.cpp')
-rw-r--r--src/libcamera/pipeline_handler.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index c19ab94f..f2e08a6a 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -35,13 +35,15 @@ namespace libcamera {
/**
* \fn PipelineHandler::match(DeviceEnumerator *enumerator)
* \brief Match media devices and create camera instances
+ * \param manager The camera manager
* \param enumerator The enumerator providing all media devices found in the
* system
*
* This function is the main entry point of the pipeline handler. It is called
- * by the camera manager with the \a enumerator passed as an argument. It
- * shall acquire from the \a enumerator all the media devices it needs for a
- * single pipeline and create one or multiple Camera instances.
+ * by the camera manager with the \a manager and \a enumerator passed as
+ * arguments. It shall acquire from the \a enumerator all the media devices it
+ * needs for a single pipeline, create one or multiple Camera instances and
+ * register them with the \a manager.
*
* If all media devices needed by the pipeline handler are found, they must all
* be acquired by a call to MediaDevice::acquire(). This function shall then
@@ -63,19 +65,6 @@ namespace libcamera {
*/
/**
- * \fn PipelineHandler::count()
- * \brief Retrieve the number of cameras handled by this pipeline handler
- * \return the number of cameras that were created by the match() function
- */
-
-/**
- * \fn PipelineHandler::camera(unsigned int id)
- * \brief Retrieve one of the cameras handled by this pipeline handler
- * \param[in] id the camera index
- * \return a pointer to the Camera identified by \a id
- */
-
-/**
* \class PipelineHandlerFactory
* \brief Registration of PipelineHandler classes and creation of instances
*