From patchwork Tue Sep 8 07:36:40 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: 28199 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 5DB51C3350 for ; Tue, 8 Sep 2026 07:36:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B35876861D; Tue, 8 Sep 2026 09:36:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="O2ckMceV"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 733E168614 for ; Tue, 8 Sep 2026 09:36:44 +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 B80F1C64 for ; Tue, 8 Sep 2026 09:35:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1788852908; bh=vuga/jCLT6Wh7gIphFnLuL4G4p1GqKTA7CXtOV57UrA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=O2ckMceV5TpTv5L5Dwj6ns1z5niLN+cemxVinUajVDa/97u0vobNFQrO12pIbygm1 f4r94I7CqqwQAdU4VY2AYUUQvVEMUfsx9X7eWwD6DtGVFfKJtuZ+hAvBM7BnQN7BcA nqo+ar5HBoT2K3qPIcNdazY6VcaWtv2cff1DQdWA= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v1 3/3] libcamera: stream: StreamConfiguration: Adjust formatting Date: Tue, 8 Sep 2026 09:36:40 +0200 Message-ID: <20260908073640.39654-3-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260908073640.39654-1-barnabas.pocze@ideasonboard.com> References: <20260908073640.39654-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; }