Message ID | 20220612152311.8408-3-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Quoting Laurent Pinchart via libcamera-devel (2022-06-12 16:23:08) > 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 <laurent.pinchart@ideasonboard.com> > --- > 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. > + * I still think a generalised pipeline traversal like proposed by Naush might be helpful sometime. But ... that's a separate topic, this documents the current behaviour, sounds reasonable so it's good to add. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > * Pipeline Configuration > * ---------------------- > * > -- > Regards, > > Laurent Pinchart >
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 * ---------------------- *
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 <laurent.pinchart@ideasonboard.com> --- src/libcamera/pipeline/simple/simple.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+)