mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 15:29:45 +03:00
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>
This commit is contained in:
parent
778f6b1d70
commit
0c32433d8c
5 changed files with 8 additions and 45 deletions
|
@ -70,14 +70,8 @@ CameraDevice::~CameraDevice()
|
|||
/*
|
||||
* Handle RPC request received from the associated proxy.
|
||||
*/
|
||||
void CameraDevice::message(Message *message)
|
||||
void CameraDevice::call(ThreadRpc *rpc)
|
||||
{
|
||||
if (message->type() != ThreadRpcMessage::type())
|
||||
return Object::message(message);
|
||||
|
||||
ThreadRpcMessage *rpcMessage = static_cast<ThreadRpcMessage *>(message);
|
||||
ThreadRpc *rpc = rpcMessage->rpc;
|
||||
|
||||
switch (rpc->tag) {
|
||||
case ThreadRpc::ProcessCaptureRequest:
|
||||
processCaptureRequest(rpc->request);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue