From patchwork Sun Sep 26 20:33:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 13937 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 38B6BBDC71 for ; Sun, 26 Sep 2021 20:33:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6E1D769190; Sun, 26 Sep 2021 22:33:31 +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="pJt+jw0S"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2FF0A6012D for ; Sun, 26 Sep 2021 22:33:30 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 874D2EF; Sun, 26 Sep 2021 22:33:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1632688409; bh=PZ8lja7/WNldmfS7YauJZeMO8M6VlQeWVgQ/CecF+/c=; h=From:To:Cc:Subject:Date:From; b=pJt+jw0SVgfEu3iBWnRa/C/ztD2EOvQ12di3ZJxusA/e/jILxLWGxEBhsI5+wTCEi 8xeBOHcFsjgFH0fQebmNaZHpu5/4kvIgF/F36mdgVj1Z4YElOdB4ET4Kwq5An/v2VH fJ3d7h+g+OhFiYDc+xL7rsh8Y0V6P9UdooAZIr98= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sun, 26 Sep 2021 23:33:18 +0300 Message-Id: <20210926203319.18289-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] simple-cam: Turn globals static 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: , Cc: Dorota Czaplejewicz Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Dorota Czaplejewicz This fixes a warning from QtCreator. Signed-off-by: Dorota Czaplejewicz Reviewed-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- simple-cam.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) base-commit: b8da445fc72cfd436ed7ddb8a428e7ea11af9fd9 prerequisite-patch-id: a93394f0289868f6be89478f79cc43f1080d5751 diff --git a/simple-cam.cpp b/simple-cam.cpp index 95e472b4377a..350f68be7906 100644 --- a/simple-cam.cpp +++ b/simple-cam.cpp @@ -16,8 +16,8 @@ #define TIMEOUT_SEC 3 using namespace libcamera; -std::shared_ptr camera; -EventLoop loop; +static std::shared_ptr camera; +static EventLoop loop; /* * -------------------------------------------------------------------- From patchwork Sun Sep 26 20:33:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 13938 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 6D295BDC71 for ; Sun, 26 Sep 2021 20:33:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3D8A46918E; Sun, 26 Sep 2021 22:33:34 +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="bX2WF8TJ"; 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 8DC1B6012D for ; Sun, 26 Sep 2021 22:33:30 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 076C5BB0; Sun, 26 Sep 2021 22:33:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1632688410; bh=vTFfUinnYMZfhGv0PyyF8Ok0MKCtLUMD6H7bs4VVOz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bX2WF8TJdgyNfnjaOVRCUDOg4f0iB/ySgcC4/zihpJ2Vhb5mgCX7xtMcIvb1pQRVm HQwQpA9rymhaWdNVn5UxrVkarjJ4Hlo8u2Ntf/CzBxkm5Pg4SoKdsjRLYu58CQNFxf 44yRWv6vrXi51Jo133AD6cyxK9w/uOO1VtpFCR0A= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sun, 26 Sep 2021 23:33:19 +0300 Message-Id: <20210926203319.18289-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210926203319.18289-1-laurent.pinchart@ideasonboard.com> References: <20210926203319.18289-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] simple-cam: Use matching type to store stream size 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: , Cc: Dorota Czaplejewicz Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Dorota Czaplejewicz Signed-off-by: Dorota Czaplejewicz Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- simple-cam.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simple-cam.cpp b/simple-cam.cpp index 350f68be7906..e374e45849dc 100644 --- a/simple-cam.cpp +++ b/simple-cam.cpp @@ -299,7 +299,7 @@ int main() return EXIT_FAILURE; } - unsigned int allocated = allocator->buffers(cfg.stream()).size(); + size_t allocated = allocator->buffers(cfg.stream()).size(); std::cout << "Allocated " << allocated << " buffers for stream" << std::endl; }