From patchwork Thu Sep 10 16:03:07 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 28222 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 DBBE3BDCBE for ; Thu, 10 Sep 2026 16:03:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3F3216866A; Thu, 10 Sep 2026 18:03:17 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="mZhVjzGX"; 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 A297168655 for ; Thu, 10 Sep 2026 18:03:14 +0200 (CEST) Received: from pb-laptop.local (185.221.140.18.nat.pool.zt.hu [185.221.140.18]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 703A25B3; Thu, 10 Sep 2026 18:01:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1789056097; bh=2JK0g6LP/kNx7CRavmNjbOt9xn8+gluGOWv7WBz1lOg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mZhVjzGXUCyBKibXPZ3/zY8zuWYE7CzwxZ5EK++8GQSrz7llw3z4iN6Y5TXZeC9JM oLZxhus6kP6A/5h1b5SvZEE4kbdCKWe3e/vOycSTp7YKA03AvfEnrfuL4W0mFhNHJU CLzBa2ed1o6f8dbB5hmWnmpTXAnuRn9iwlQnIG+c= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham Subject: [PATCH v2 3/5] libcamera: stream: StreamConfiguration: Adjust formatting Date: Thu, 10 Sep 2026 18:03:07 +0200 Message-ID: <20260910160309.940584-3-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260910160309.940584-1-barnabas.pocze@ideasonboard.com> References: <20260910160309.940584-1-barnabas.pocze@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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Adjust the formatting of how a `StreamConfiguration` is formatted to a stream. Specifically, print the `frameSize` and `stride` members in a format similar to how it is done for `V4L2DeviceFormat`. Example: configuring streams: (0) 640x480-YUYV[614400/1280]/Rec709/Rec709/Rec601/Limited Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham --- src/libcamera/stream.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp index be0c80cbcf..af730ff8a5 100644 --- a/src/libcamera/stream.cpp +++ b/src/libcamera/stream.cpp @@ -407,8 +407,9 @@ std::string StreamConfiguration::toString() const */ std::ostream &operator<<(std::ostream &out, const StreamConfiguration &cfg) { - out << cfg.size << "-" << cfg.pixelFormat << "/" - << ColorSpace::toString(cfg.colorSpace); + out << cfg.size << '-' << cfg.pixelFormat + << '[' << cfg.frameSize << '/' << cfg.stride << ']' + << '/' << ColorSpace::toString(cfg.colorSpace); return out; }