[libcamera-devel] [PATCH v2 1/3] libcamera: PipelineHandler: Make queueRequest() void function
Hirokazu Honda
hiroh at chromium.org
Mon Mar 29 11:15:50 CEST 2021
PipelineHandler::queueRequest() is asynchronously invoked in
Camera::queueRequest(). Therefore the return value of
PipelineHandler::queueRequest() is useless. This changes the
function to a void function.
Signed-off-by: Hirokazu Honda <hiroh at chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
include/libcamera/internal/pipeline_handler.h | 2 +-
src/libcamera/camera.cpp | 6 ++++--
src/libcamera/pipeline_handler.cpp | 6 +-----
3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index 6aca0b46..093b94c6 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -79,7 +79,7 @@ public:
virtual int start(Camera *camera, const ControlList *controls) = 0;
virtual void stop(Camera *camera) = 0;
- int queueRequest(Request *request);
+ void queueRequest(Request *request);
bool completeBuffer(Request *request, FrameBuffer *buffer);
void completeRequest(Request *request);
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 84edbb8f..2611c701 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -996,8 +996,10 @@ int Camera::queueRequest(Request *request)
}
}
- return d->pipe_->invokeMethod(&PipelineHandler::queueRequest,
- ConnectionTypeQueued, request);
+ d->pipe_->invokeMethod(&PipelineHandler::queueRequest,
+ ConnectionTypeQueued, request);
+
+ return 0;
}
/**
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index d22991d3..eba00ed3 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -371,10 +371,8 @@ const ControlList &PipelineHandler::properties(const Camera *camera) const
* signalled by the pipeline handler using the completeRequest() method.
*
* \context This function is called from the CameraManager thread.
- *
- * \return 0 on success or a negative error code otherwise
*/
-int PipelineHandler::queueRequest(Request *request)
+void PipelineHandler::queueRequest(Request *request)
{
LIBCAMERA_TRACEPOINT(request_queue, request);
@@ -385,8 +383,6 @@ int PipelineHandler::queueRequest(Request *request)
int ret = queueRequestDevice(camera, request);
if (ret)
data->queuedRequests_.remove(request);
-
- return ret;
}
/**
--
2.31.0.291.g576ba9dcdaf-goog
More information about the libcamera-devel
mailing list