From patchwork Sat Oct 23 10:32:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 14287 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 B81F5BDB1C for ; Sat, 23 Oct 2021 10:33:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6F22164875; Sat, 23 Oct 2021 12:33:15 +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="d1jheNU4"; 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 3C44364872 for ; Sat, 23 Oct 2021 12:33:12 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.213]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 30326547; Sat, 23 Oct 2021 12:33:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1634985191; bh=AlJReVeln4u9zXt1oUQuYkFTPfsRC8SFWObfcKIUMzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d1jheNU4xt7Llm1yoqxeaUbnHw1T7z2v0E/QS3gwJQE67QxltVy8pQF8cF7ToVWV7 1+5mJ6djOhUQOSiQkwwZQq+iYHHDzIrUt5ozhj6Ew/73u7UK7wFsObyJs+U1/pD5SE l0fubRAvJFA4Sg6DKWRfN5Cuh2V9RHsqXmht1c8Y= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Sat, 23 Oct 2021 16:02:56 +0530 Message-Id: <20211023103302.152769-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211023103302.152769-1-umang.jain@ideasonboard.com> References: <20211023103302.152769-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 1/7] android: camera_stream: Replace post-processor nullptr check 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" Instead of checking postProcessor for nullptr, replace this check with an assertion that checks if the camera stream's type is not Type::Direct. Since it makes no sense to call CameraStream::process() on a Type::Direct camera stream. Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart Reviewed-by: Hirokazu Honda Reviewed-by: Kieran Bingham --- src/android/camera_stream.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp index f44a2717..ca25c4db 100644 --- a/src/android/camera_stream.cpp +++ b/src/android/camera_stream.cpp @@ -163,8 +163,7 @@ int CameraStream::process(const FrameBuffer &source, dest.fence = -1; } - if (!postProcessor_) - return 0; + ASSERT(type_ != Type::Direct); /* * \todo Buffer mapping and processing should be moved to a