From patchwork Tue Aug 24 14:24:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 13459 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 8F2BABD87D for ; Tue, 24 Aug 2021 14:24:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D498B688A5; Tue, 24 Aug 2021 16:24:55 +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="ps929XYG"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4612560505 for ; Tue, 24 Aug 2021 16:24:55 +0200 (CEST) Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C64252A5; Tue, 24 Aug 2021 16:24:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1629815094; bh=ZrdCyUHl26EP6jauvgys3cq2459Ih5wcz+c8VRqHLAc=; h=From:To:Cc:Subject:Date:From; b=ps929XYG/LAHPXxnFD5FX5iPCb/oP5gvK+nm+g5zMc+IDyy2XKebTftpgXNRhDcCj NFd8FY2FRiCkdLVY+bLl+lEwBZZga2bnLGkwmE+dyILks5NXAHDSV6Nz3tKUsMTO1P Q7FOMI7KsQ9ldFhDfpCvkJFT6LLK6jFZ/tUUw98s= From: Kieran Bingham To: libcamera devel Date: Tue, 24 Aug 2021 15:24:46 +0100 Message-Id: <20210824142450.3157833-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [SimpleCam PATCH 0/4] Improve CameraManager usage and Doc 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" The CameraManager was not being released before the end of the application. While this does not cause any direct issues, it counts as a memory leak. Demonstrate a cleaner way to manage the CameraManager using a unique_ptr to convey that the application is responsible for it's lifetime. Along the way, improve the documentation throughout. Kieran Bingham (4): simple-cam: Use a unique_ptr for the CameraManager simple-cam: Improve documentation of validate/configure simple-cam: Fix the Buffer Allocation guidance simple-cam: Correct the capitalisation of 'libcamera' simple-cam.cpp | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) Reviewed-by: Paul Elder