From patchwork Sun Jun 12 15:23:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16199 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 D578BC3274 for ; Sun, 12 Jun 2022 15:23:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7CFBA6563F; Sun, 12 Jun 2022 17:23:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1655047407; bh=tyHDn1gsDhR7Y+kOIC/MExFl5d/mTR0Q63bbCT4diGA=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=BGWjxkZygc30fBsnmBMjOO+SG5obVP3JyPUCUc2WKL00F/bJf8HODr6pYyyYfnqZl SZGNOOC7JzQUcAB9CdmKBsCuy4Jivq9hpMICxJBpQDY5dQx8AXDn1Yy2MgQrLS2MTx ouniYP8jSkofMuknxgoZocF4CKsM5rlIf8SypKMBJPU+ckseGl5WsALs8LhK8oUg2P +PuGB+Ubjwe+hAPSqAminJsBzS1sQjOCyVPyjZIj2l4e1eovSsLmi2aP2/gXWN3Z/q f8mo/W2a+Wvz32FYNbhWo+Ia7e1Wb+b4TAqhE1Fov8wxUWb7eGZK/jyZVcA/dK2RQZ v95I1/31VvX8g== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 03E8B65633 for ; Sun, 12 Jun 2022 17:23:25 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="PzY5EIt1"; dkim-atps=neutral Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 72968D24; Sun, 12 Jun 2022 17:23:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1655047404; bh=tyHDn1gsDhR7Y+kOIC/MExFl5d/mTR0Q63bbCT4diGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PzY5EIt1+A6edanws6K9lWRnhkSSKBJVOOZZ+A9D7GcbDTKy/ekJuI2NzaCv0yTqB BaB843LVAXS/Q3hetrcexiCOka8B/8bGMcSY2v+WPxhOAzkltqQIqvt4YZ6bPT4oQx NjBpgmO1ha9UqYQweuRlnXPDMoIN5e6q4DfE9sjs= To: libcamera-devel@lists.libcamera.org Date: Sun, 12 Jun 2022 18:23:08 +0300 Message-Id: <20220612152311.8408-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220612152311.8408-1-laurent.pinchart@ideasonboard.com> References: <20220612152311.8408-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/5] libcamera: pipeline: simple: Document the pipeline traversal algorithm 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: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Cc: Dorota Czaplejewicz , Benjamin Schaaf Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a section to the documentation at the top of the file to describe in a bit more details how the media graph is traversed. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/simple/simple.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index efb28ccd97e8..b09368aee20b 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -95,6 +95,21 @@ LOG_DEFINE_CATEGORY(SimplePipeline) * valid pipeline configurations are found, a Camera is registered for the * SimpleCameraData instance. * + * Pipeline Traversal + * ------------------ + * + * During the breadth-first search, the pipeline is traversed from entity to + * entity, by following media graph links from source to sink, starting at the + * camera sensor. When reaching an entity (on its sink side), all its source + * pads are considered to continue the graph traversal. + * + * The shortest path between the camera sensor and a video node is stored in + * SimpleCameraData::entities_ as a list of SimpleCameraData::Entity structures, + * ordered along the data path from the camera sensor to the video node. The + * Entity structure stores a pointer to the MediaEntity, as well as information + * about how it is connected in that particular path for later usage when + * configuring the pipeline. + * * Pipeline Configuration * ---------------------- *