summaryrefslogtreecommitdiff
path: root/src/android/thread_rpc.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-08-12 05:30:06 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-08-19 18:07:28 +0300
commit0c32433d8c742d2a52d44264c64faec2c7ac28f2 (patch)
tree2d38c176392f38b9e31f7d48a5ad1be26f628a79 /src/android/thread_rpc.cpp
parent778f6b1d7070ddc5b920764d5233e318b15ccf12 (diff)
android: Simplify thread RPC with Object::invokeMethod()
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/thread_rpc.cpp')
-rw-r--r--src/android/thread_rpc.cpp18
1 files changed, 1 insertions, 17 deletions
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_;
-}