From patchwork Wed May 4 13:21:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15775 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 A4EE0C326C for ; Wed, 4 May 2022 13:22:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DD82D6564C; Wed, 4 May 2022 15:22:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1651670522; bh=n9gj6BTLGz9tumldNX/3y542S1gieNsp30b0qPBm8P4=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=o+hC1VlS8XAhU0LfC/EbugqU+k4DalpmS1ZAqWOlozYw7BjZgS0Zz4Szp8jqmCX7F s1AnJtLaHxd9+q+5BWqffxS66Deb+N9fDdGyWwYXys0sQ0x/4DqOlU94tzKxhJDddX 9Pn1o1SAtvX8uf7XaKaDlfVI/bHiBNDyGhjB6T2WGshFZj/jtDQdvbviXQFW1P8g6v 102qnUSn05qPQ9yTd6oLiRbCGmnGZcq8QqSO/iWgwXOnjBQvALjzatJ6v0Gpl2Yn31 kMeR9b2XHEZWMUFPaO/meWS+OCTcbPRXvhwy0qfNbknov4FJcWIi5kN0OUi5FPX1pL bFQ2+0cPTPdnw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 59FE865641 for ; Wed, 4 May 2022 15:22:00 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="NyQm/TS1"; 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 00EF04A8 for ; Wed, 4 May 2022 15:21:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1651670520; bh=n9gj6BTLGz9tumldNX/3y542S1gieNsp30b0qPBm8P4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NyQm/TS1SNevCv1IwFc/xbN+yVJu24sZRF2L09OCV0u6z24MraZdr+ML+0I//WSF9 cuVTfm6YKamvXISntSQOnvMe1uGe+mybjXdkBMl2JZvBKou33fqd0d8MfuS29qm/Hi l4pYNKqyztNjzsEimYW3FqKTmuhwRYbZrC9/Oifo= To: libcamera-devel@lists.libcamera.org Date: Wed, 4 May 2022 16:21:51 +0300 Message-Id: <20220504132154.9681-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220504132154.9681-1-laurent.pinchart@ideasonboard.com> References: <20220504132154.9681-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 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 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 --- 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 22efc8f498dc..4f963df16315 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 * ---------------------- *