From 0c32433d8c742d2a52d44264c64faec2c7ac28f2 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 12 Aug 2019 05:30:06 +0300 Subject: android: Simplify thread RPC with Object::invokeMethod() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the manual implementation of asynchronous method invocation through a custom message with Object::invokeMethod(). This simplifies the thread RPC implementation. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- src/android/thread_rpc.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/android/thread_rpc.cpp') diff --git a/src/android/thread_rpc.cpp b/src/android/thread_rpc.cpp index 295a05d7..f57891ff 100644 --- a/src/android/thread_rpc.cpp +++ b/src/android/thread_rpc.cpp @@ -5,19 +5,11 @@ * thread_rpc.cpp - Inter-thread procedure call */ +#include "thread.h" #include "thread_rpc.h" -#include "message.h" - using namespace libcamera; -libcamera::Message::Type ThreadRpcMessage::rpcType_ = Message::Type::None; - -ThreadRpcMessage::ThreadRpcMessage() - : Message(type()) -{ -} - void ThreadRpc::notifyReception() { { @@ -32,11 +24,3 @@ void ThreadRpc::waitDelivery() libcamera::MutexLocker locker(mutex_); cv_.wait(locker, [&] { return delivered_; }); } - -Message::Type ThreadRpcMessage::type() -{ - if (ThreadRpcMessage::rpcType_ == Message::Type::None) - rpcType_ = Message::registerMessageType(); - - return rpcType_; -} -- cgit v1.2.1