[libcamera-devel] [PATCH v2 1/2] pipeline: raspberrypi: Split out device enumeration and camera registration
Naushir Patuck
naush at raspberrypi.com
Mon Nov 22 13:34:26 CET 2021
Split out PipelineHandlerRPi::match() so that media device enumeration and
acquisition is separated from camera registration. The former logic remains
in PipelineHandlerRPi::match(), whereas the latter logic is moved into a new
PipelineHandlerRPi::registerCameras() member function.
Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 4f6c699a4379..9aa7e9eef5e7 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -311,6 +311,7 @@ private:
return static_cast<RPiCameraData *>(camera->_d());
}
+ bool registerCameras();
int queueAllBuffers(Camera *camera);
int prepareBuffers(Camera *camera);
void freeBuffers(Camera *camera);
@@ -1010,6 +1011,11 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)
if (!isp_)
return false;
+ return registerCameras();
+}
+
+bool PipelineHandlerRPi::registerCameras()
+{
std::unique_ptr<RPiCameraData> data = std::make_unique<RPiCameraData>(this);
if (!data->dmaHeap_.isValid())
return false;
--
2.25.1
More information about the libcamera-devel
mailing list