[PATCH 2/5] libcamera: rkisp1: Create a request with a custom private class
Jacopo Mondi
jacopo.mondi at ideasonboard.com
Wed Feb 21 18:40:10 CET 2024
Signed-off-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
---
src/libcamera/pipeline/rkisp1/rkisp1.cpp | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 586b46d64630..e981e60758f7 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -39,6 +39,7 @@
#include "libcamera/internal/ipa_manager.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/pipeline_handler.h"
+#include "libcamera/internal/request.h"
#include "libcamera/internal/v4l2_subdevice.h"
#include "libcamera/internal/v4l2_videodevice.h"
@@ -83,6 +84,15 @@ private:
std::map<unsigned int, RkISP1FrameInfo *> frameInfo_;
};
+class RkISP1Request : public Request::Private
+{
+public:
+ RkISP1Request(Camera *camera)
+ : Request::Private(camera)
+ {
+ }
+};
+
class RkISP1CameraData : public Camera::Private
{
public:
@@ -157,6 +167,8 @@ public:
int start(Camera *camera, const ControlList *controls) override;
void stopDevice(Camera *camera) override;
+ std::unique_ptr<Request> createRequestDevice(Camera *camera,
+ uint64_t cookie) override;
int queueRequestDevice(Camera *camera, Request *request) override;
bool match(DeviceEnumerator *enumerator) override;
@@ -1020,6 +1032,13 @@ void PipelineHandlerRkISP1::stopDevice(Camera *camera)
activeCamera_ = nullptr;
}
+std::unique_ptr<Request> PipelineHandlerRkISP1::createRequestDevice(Camera *camera,
+ uint64_t cookie)
+{
+ auto request = std::make_unique<RkISP1Request>(camera);
+ return Request::create(std::move(request), cookie);
+}
+
int PipelineHandlerRkISP1::queueRequestDevice(Camera *camera, Request *request)
{
RkISP1CameraData *data = cameraData(camera);
--
2.43.0
More information about the libcamera-devel
mailing list