From patchwork Mon Mar 3 13:45:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22904 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 3BDAABD808 for ; Mon, 3 Mar 2025 13:45:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3FE1268777; Mon, 3 Mar 2025 14:45:42 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="qZx6BLpK"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CCD4968772 for ; Mon, 3 Mar 2025 14:45:39 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1F83D2D5 for ; Mon, 3 Mar 2025 14:44:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1741009448; bh=Z0teT6McvMTvm4YeGrJMrjOBG+avVU/tgszAH6bzpKM=; h=From:To:Subject:Date:From; b=qZx6BLpKqmhtnJKHr2MlbbLQzRdaiO0HLs/fkiJzHm/ZWYZr2qVvyzyxBvpqL0cmE yeoIrZ6DKef69+mYNUHwLWn586DiQjiphyrNtXo6Z1TUwyJSCOs9qGX0C1cDUGzfOy A1Mr6E/HOq/vJF12xRb20p9rsud0Rvxv7RNprphM= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2] libcamera: camera_manager: Log info message to report camera creation Date: Mon, 3 Mar 2025 15:45:18 +0200 Message-ID: <20250303134518.10441-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 MIME-Version: 1.0 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" Camera creation is one of the most important events generated by libcamera, but we are completely silent about it. The lack of a log message makes it more difficult to identify problems and provide support. Fix it by adding an Info message that reports the camera id and its pipeline handler when the camera is added. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- Changes since v1: - Move message to CameraManager class --- src/libcamera/camera_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) base-commit: c0a58b97989f7d529f1469b2c2f8705ff55d3af4 -- Regards, Laurent Pinchart diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp index 87e6717ece91..942a72dcfc96 100644 --- a/src/libcamera/camera_manager.cpp +++ b/src/libcamera/camera_manager.cpp @@ -217,6 +217,10 @@ void CameraManager::Private::addCamera(std::shared_ptr camera) unsigned int index = cameras_.size() - 1; + LOG(Camera, Info) + << "Adding camera '" << camera->id() << "' for pipeline handler " + << camera->_d()->pipe()->name(); + /* Report the addition to the public signal */ CameraManager *const o = LIBCAMERA_O_PTR(); o->cameraAdded.emit(cameras_[index]);