From patchwork Wed Mar 13 12:12:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 19709 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 9DBD7BD160 for ; Wed, 13 Mar 2024 12:13:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A0CDF62C9D; Wed, 13 Mar 2024 13:12:59 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="CrVCuWoB"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A45BC62C92 for ; Wed, 13 Mar 2024 13:12:45 +0100 (CET) Received: from jasper.fritz.box (unknown [IPv6:2a00:6020:448c:6c00:9b07:31b5:38e1:e957]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1F798F8B; Wed, 13 Mar 2024 13:12:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1710331943; bh=eqDcYzYC3IRHoBLNUgYxis11DNDgStZM920gWGOcno8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CrVCuWoBMIo10Rhc8qe16Bhe1oBN1zKJJ9XWzhkWNqZzXq4Bti6eSe6qAZMR++wzR N9wjEPv7RRG9ysD9gX2zbpfcay0HgWf0JozTacyuuJLvO6z28FVUPkPrgBC19aBUv3 eKc7MJFXxs4USuwLv1ZHqV1hF3HtwPLT64ObvjPk= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2 07/12] libcamera: delayed_controls: Add some logging Date: Wed, 13 Mar 2024 13:12:18 +0100 Message-Id: <20240313121223.138150-8-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240313121223.138150-1-stefan.klug@ideasonboard.com> References: <20240313121223.138150-1-stefan.klug@ideasonboard.com> 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: , Cc: Stefan Klug Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This replaces changes the log output to a more compact form. There might be different opinions on that one Signed-off-by: Stefan Klug --- src/libcamera/delayed_controls.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp index 59314388..c46e54d1 100644 --- a/src/libcamera/delayed_controls.cpp +++ b/src/libcamera/delayed_controls.cpp @@ -104,6 +104,8 @@ DelayedControls::DelayedControls(V4L2Device *device, maxDelay_ = std::max(maxDelay_, controlParams_[id].delay); } + LOG(DelayedControls, Debug) << "Maximum delay: " << maxDelay_; + reset(); } @@ -212,6 +214,14 @@ bool DelayedControls::push(const ControlList &controls) bool DelayedControls::pushForFrame(uint32_t sequence, const ControlList &controls) { + LOG(DelayedControls, Debug) << "push: " << sequence; + auto idMap = controls.idMap(); + if (idMap) { + for (const auto &[id, value] : controls) { + LOG(DelayedControls, Debug) << " " << idMap->at(id)->name() << " : " << value.toString(); + } + } + if (sequence < queueIndex_) { LOG(DelayedControls, Debug) << "Got updated data for frame:" << sequence; } @@ -320,6 +330,7 @@ bool DelayedControls::pushForFrame(uint32_t sequence, const ControlList &control */ ControlList DelayedControls::get(uint32_t sequence) { + LOG(DelayedControls, Debug) << "get " << sequence << ":"; ControlList out(device_->controls()); for (const auto &ctrl : values_) { const ControlId *id = ctrl.first; @@ -328,9 +339,8 @@ ControlList DelayedControls::get(uint32_t sequence) out.set(id->id(), info); LOG(DelayedControls, Debug) - << "Reading " << id->name() - << " to " << info.toString() - << " at index " << sequence; + << " " << id->name() + << ": " << info.toString(); } return out;