From patchwork Thu Aug 26 21:30:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13516 X-Patchwork-Delegate: umang.jain@ideasonboard.com Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 4167FC3241 for ; Thu, 26 Aug 2021 21:30:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D2AEA68928; Thu, 26 Aug 2021 23:30:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="GuWIhXOp"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4EA1D68939 for ; Thu, 26 Aug 2021 23:30:28 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.246]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2E304191F; Thu, 26 Aug 2021 23:30:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1630013428; bh=gJ+LbJJ+dxzljpBCnlUKcnMNM/xGWD/NL5UWZu7Y4bo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GuWIhXOp6KevLY7ygSc3JEfVmxhuYjP/1YeKvI0grfcHAKLlRVPUTNi/DbbFEWRI/ KKw1mMBpJQnCNa2xpnbabekRZz/g5oLYBLK86pKdYwKMVLOdim/Fud6CH53GiuT/Z/ mKLbj3OsOwIMmTOWY/5OtE4zJhpwixHOP4OGc4V4= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Fri, 27 Aug 2021 03:00:12 +0530 Message-Id: <20210826213016.1829504-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210826213016.1829504-1-umang.jain@ideasonboard.com> References: <20210826213016.1829504-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 1/5] android: post_processor: Inherit from libcamera::Object X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Currently, the post processing of a stream happens synchronously in CameraStream::process(). There is a plan to offload this processing to a separate worker thread. In order to achieve that, we need to move the post processor to a separate thread and invoke methods on it from the CameraStream's thread. Object::moveToThread() and Object::invokeMethod() shall be used respectively, to achieve that goal. Hence, inherit the PostProcessor interface from libcamera::object. Signed-off-by: Umang Jain --- src/android/post_processor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/android/post_processor.h b/src/android/post_processor.h index ab2b2c60..b2b5bd55 100644 --- a/src/android/post_processor.h +++ b/src/android/post_processor.h @@ -7,6 +7,8 @@ #ifndef __ANDROID_POST_PROCESSOR_H__ #define __ANDROID_POST_PROCESSOR_H__ +#include + #include #include @@ -14,7 +16,7 @@ class CameraMetadata; -class PostProcessor +class PostProcessor : public libcamera::Object { public: virtual ~PostProcessor() = default;