[libcamera-devel] [PATCH 1/3] libcamera: PipelineHandler: Make queueRequest() void function
Hirokazu Honda
hiroh at chromium.org
Mon Mar 29 02:27:13 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>
---
include/libcamera/internal/pipeline_handler.h | 2 +-
src/libcamera/camera.cpp | 6 ++++--
src/libcamera/pipeline_handler.cpp | 4 +---
3 files changed, 6 insertions(+), 6 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..05b807d6 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -374,7 +374,7 @@ const ControlList &PipelineHandler::properties(const Camera *camera) const
*
* \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 +385,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