summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcamera/internal/pipeline_handler.h1
-rw-r--r--src/libcamera/pipeline_handler.cpp13
2 files changed, 14 insertions, 0 deletions
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index 22e629a8..c1873df0 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -97,6 +97,7 @@ protected:
virtual int queueRequestDevice(Camera *camera, Request *request) = 0;
CameraData *cameraData(const Camera *camera);
+ const CameraData *cameraData(const Camera *camera) const;
CameraManager *manager_;
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index ccd45edc..73c51972 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -602,6 +602,19 @@ CameraData *PipelineHandler::cameraData(const Camera *camera)
}
/**
+ * \brief Retrieve the pipeline-specific data associated with a Camera
+ * \param[in] camera The camera whose data to retrieve
+ * \sa cameraData()
+ * \return A const pointer to the pipeline-specific data passed to
+ * registerCamera().
+ */
+const CameraData *PipelineHandler::cameraData(const Camera *camera) const
+{
+ ASSERT(cameraData_.count(camera));
+ return cameraData_.at(camera).get();
+}
+
+/**
* \var PipelineHandler::manager_
* \brief The Camera manager associated with the pipeline handler
*