From patchwork Thu Dec 23 02:24:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15211 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 7283BBF415 for ; Thu, 23 Dec 2021 02:24:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9220160903; Thu, 23 Dec 2021 03:24:35 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="JWwN18Hj"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1DBC8605A8 for ; Thu, 23 Dec 2021 03:24:34 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 979E72C5 for ; Thu, 23 Dec 2021 03:24:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1640226273; bh=Ls8z7lz98gG3hjjV4W08Q5bYHvq9FwaxUJKMXmS0pLE=; h=From:To:Subject:Date:From; b=JWwN18HjcwuaCEIaS8wpm/46wfHMLix3RUtYLXm18OrKHD/utiRr8yaXd9T1wGBH4 oztkpepfpZg/giC7ImHP0C1vMc583K+yzaap9uL7sPpf3ReR4BPQ4bpHnf6hcJob5b T0CanZQe/427tCaiIKQS1B5Pck0RwixHrKtSvCLI= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Thu, 23 Dec 2021 04:24:25 +0200 Message-Id: <20211223022425.11927-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: pipeline: simple: Rename Entity::link to sourceLink 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" The Entity::link member has an ambiguous name. Rename it to sourceLink to clarify that it stores the link on the source pad. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- src/libcamera/pipeline/simple/simple.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) base-commit: 8ff5a8d548eee7c2cb14b355867debdb29e75419 diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index 8aa36306952b..ece821bfe978 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -202,10 +202,10 @@ public: */ const MediaPad *source; /* - * The link to the downstream entity, null for the video node at - * the end of the pipeline. + * The link on the source pad, to the downstream entity, null + * for the video node at the end of the pipeline. */ - MediaLink *link; + MediaLink *sourceLink; }; struct Configuration { @@ -537,13 +537,13 @@ int SimpleCameraData::setupLinks() * want to enable) before enabling the pipeline link. */ for (SimpleCameraData::Entity &e : entities_) { - if (!e.link) + if (!e.sourceLink) break; - MediaEntity *remote = e.link->sink()->entity(); + MediaEntity *remote = e.sourceLink->sink()->entity(); for (MediaPad *pad : remote->pads()) { for (MediaLink *link : pad->links()) { - if (link == e.link) + if (link == e.sourceLink) continue; if ((link->flags() & MEDIA_LNK_FL_ENABLED) && @@ -555,8 +555,8 @@ int SimpleCameraData::setupLinks() } } - if (!(e.link->flags() & MEDIA_LNK_FL_ENABLED)) { - ret = e.link->setEnabled(true); + if (!(e.sourceLink->flags() & MEDIA_LNK_FL_ENABLED)) { + ret = e.sourceLink->setEnabled(true); if (ret < 0) return ret; } @@ -580,10 +580,10 @@ int SimpleCameraData::setupFormats(V4L2SubdeviceFormat *format, return ret; for (const Entity &e : entities_) { - if (!e.link) + if (!e.sourceLink) break; - MediaLink *link = e.link; + MediaLink *link = e.sourceLink; MediaPad *source = link->source(); MediaPad *sink = link->sink();