From patchwork Tue Aug 30 13:33:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 17261 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 2598DC3272 for ; Tue, 30 Aug 2022 13:33:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5879F61FBD; Tue, 30 Aug 2022 15:33:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1661866410; bh=6yopac0kAiHtgCk3iBcjUgr+9VvAfiMSdCi8C+US/PM=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=AWIQKwOpExwygegPU4J18qq+61v84h+z2fUHJgJRabzjd04RIJWU0tMlrSp7mdIq+ 1sXItMx3gp/95w7AVOoFLs6/l3ygl+BKXDXycP4CW/G7WCDOf34QWKKR/4yHVYVhIb BaKZ6IrgvIwaaq+UrFCShKNirBWUgYf7jVkiFKtoygJM1VAB+6REihVXGrONaxgE7M kBLwUlF5Nb0Ft4NUGtIF41ybPOdbvkaaN3iYsCyEel39ATzEWmNd/NHbH9e5KTMdTg 0WY2S2e+1ZQ7gOtiyRow3vgzPI0ZYuOEMxrAyxJLB0sdhgbOXP5JhrIr31TRkMV7+w 0tLxLcolXw/6g== 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 A7F4461F9C for ; Tue, 30 Aug 2022 15:33:28 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="CrL6/LQ9"; dkim-atps=neutral Received: from umang.jainideasonboard.com (unknown [IPv6:2401:4900:1f3f:1548:78ac:4a3:edc3:c28a]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 016A4481; Tue, 30 Aug 2022 15:33:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1661866408; bh=6yopac0kAiHtgCk3iBcjUgr+9VvAfiMSdCi8C+US/PM=; h=From:To:Cc:Subject:Date:From; b=CrL6/LQ9/1NaQarxChrxq0FngcN/b98f/BfPQSdL3SPiync1DZy1NdWEbJkfsV9px yKE/aMnFXEhUFRnHRk5anM/+wlfRxDV6zSwnZfRbCM9GFdRz4gAN8lkCws1gYhWaTB yvcWrizRHOuFq0S42xgwjSoKTLzIRXaFQSn0G/6c= To: libcamera-devel@lists.libcamera.org Date: Tue, 30 Aug 2022 19:03:21 +0530 Message-Id: <20220830133321.1107312-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2] libcamera: request: Rename Private::reuse() to Private::reset() 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: , X-Patchwork-Original-From: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The Request::Private::reuse() is different from Request::reuse(). It reset the members of Request::Private to default values hence, rename it to more appropriate Request::Private::reset(). Update the usage and documentation accordingly. Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- Changes in v2: - Overhaul the patch by renaming Private::reuse() to reset() v1: [PATCH] libcamera: request: Fix doxygen warning --- include/libcamera/internal/request.h | 2 +- src/libcamera/request.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/libcamera/internal/request.h b/include/libcamera/internal/request.h index 9dadd6c6..8c92a27a 100644 --- a/include/libcamera/internal/request.h +++ b/include/libcamera/internal/request.h @@ -37,7 +37,7 @@ public: bool completeBuffer(FrameBuffer *buffer); void complete(); void cancel(); - void reuse(); + void reset(); void prepare(std::chrono::milliseconds timeout = 0ms); Signal<> prepared; diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index d2af1d22..949c556f 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -158,9 +158,12 @@ void Request::Private::cancel() } /** - * \copydoc Request::reuse() + * \brief Reset the request internal data to default values + * + * After calling this function, all request internal data will have default + * values as if the Request::Private instance had just been constructed. */ -void Request::Private::reuse() +void Request::Private::reset() { sequence_ = 0; cancelled_ = false; @@ -380,7 +383,7 @@ void Request::reuse(ReuseFlag flags) { LIBCAMERA_TRACEPOINT(request_reuse, this); - _d()->reuse(); + _d()->reset(); if (flags & ReuseBuffers) { for (auto pair : bufferMap_) {