From patchwork Thu Aug 15 21:09:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 20944 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 31CADC323E for ; Thu, 15 Aug 2024 21:09:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D7D8A633B3; Thu, 15 Aug 2024 23:09:31 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="emWCBROc"; 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 F3CD961955 for ; Thu, 15 Aug 2024 23:09:28 +0200 (CEST) Received: from Monstersaurus.tail69b4.ts.net (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 21F42827; Thu, 15 Aug 2024 23:08:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1723756110; bh=rkSarj3wkty5xCJZNqeQQHKqIzKzKGjVDWuYXdUnIA4=; h=From:To:Cc:Subject:Date:From; b=emWCBROcmGCua0aRnFCwih1ELbVRSBN5mXC2ZBtCGZLP7Afsl44FADW0+eQlk/ejS ah3Hc+cdwe5nnUSrfC8rhIZYfMWVv7V6uDdDeAQZzL7RfnPElsy2+GkDm8efzetg8I 78BnoEP5vZAibD4k+Q6JjB9/wktzGN7K600Owfks= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham Subject: [PATCH 0/3] MediaLink: Provide a string representation Date: Thu, 15 Aug 2024 22:09:22 +0100 Message-Id: <20240815210925.4172287-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 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" While developing on the RkISP1 pipeline handler, I found myself replicating instances of printing a MediaLink. Provide a .toString() helper and a corresponding overload<< operator to directly report a string representation of a Link in a common and defined way. Patches 2 and 3 then replace existing locations that report MediaLink objects in a string form to use the new shorthand, and I have more development on top which will also use this. Kieran Bingham (3): libcamera: media_object: Add MediaLink string representations libcamera: media_device: Use MediaLink string helper libcamera: pipeline: simple: Use MediaLink string helper include/libcamera/internal/media_object.h | 4 ++++ src/libcamera/media_device.cpp | 14 ++++--------- src/libcamera/media_object.cpp | 25 +++++++++++++++++++++++ src/libcamera/pipeline/simple/simple.cpp | 7 ++----- 4 files changed, 35 insertions(+), 15 deletions(-)