diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2019-10-27 02:01:08 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-30 02:37:37 +0200 |
commit | 53eab996809e826bc914e4c34c78fe74d86f8dc4 (patch) | |
tree | 26442c7a7115f4d42f82fbb0c6bc3c6c61e79b30 /src/android/camera_proxy.cpp | |
parent | 1f1d27cc14bb1ed7b74c541e523d8f77b0a98dbb (diff) |
android: Replace ThreadRPC with blocking method call
Use the newly introduced InvocationTypeBlocking message type to replace
the blocking message delivery implemented with the ThreadRPC class in the
Android camera HAL.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/android/camera_proxy.cpp')
-rw-r--r-- | src/android/camera_proxy.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/android/camera_proxy.cpp b/src/android/camera_proxy.cpp index 43e1e1c3..3964b566 100644 --- a/src/android/camera_proxy.cpp +++ b/src/android/camera_proxy.cpp @@ -16,7 +16,6 @@ #include "utils.h" #include "camera_device.h" -#include "thread_rpc.h" using namespace libcamera; @@ -148,10 +147,8 @@ int CameraProxy::open(const hw_module_t *hardwareModule) void CameraProxy::close() { - ThreadRpc rpcRequest; - rpcRequest.tag = ThreadRpc::Close; - - threadRpcCall(rpcRequest); + cameraDevice_->invokeMethod(&CameraDevice::close, + ConnectionTypeBlocking); } void CameraProxy::initialize(const camera3_callback_ops_t *callbacks) @@ -176,18 +173,8 @@ int CameraProxy::configureStreams(camera3_stream_configuration_t *stream_list) int CameraProxy::processCaptureRequest(camera3_capture_request_t *request) { - ThreadRpc rpcRequest; - rpcRequest.tag = ThreadRpc::ProcessCaptureRequest; - rpcRequest.request = request; - - threadRpcCall(rpcRequest); + cameraDevice_->invokeMethod(&CameraDevice::processCaptureRequest, + ConnectionTypeBlocking, request); return 0; } - -void CameraProxy::threadRpcCall(ThreadRpc &rpcRequest) -{ - cameraDevice_->invokeMethod(&CameraDevice::call, ConnectionTypeQueued, - &rpcRequest); - rpcRequest.waitDelivery(); -} |