[PATCH v2 0/2] pipeline: simple: Fix matching with an empty media graph

Paul Elder paul.elder at ideasonboard.com
Wed Mar 26 09:47:57 CET 2025


The simple pipeline handler may encounter systems with multiple media
devices that can be supported.

If the first media graph it could support is invalid or empty and a
subsequent media graph could handle it - the simple pipeline handler
would not continue matching to complete the creation of cameras on those
later devices.

The second patch updates the pipeline handler to iterate attempts to
acquire a supported MediaDevice until they are exhausted, ensureing that
all supportable cameras in a system will be created.

The first patch addresses a comment from v1, and adds a function to the
base PipelineHandler class for clearing the list of acquired media
devices, thus preventing a mix of invalid media devices from a
previously failed match and valid media devices from the current
succeeding match.

Paul Elder (2):
  libcamera: pipeline: Add function to clear acquired media devices
  pipeline: simple: Fix matching with empty media graphs

 include/libcamera/internal/pipeline_handler.h |  2 +
 src/libcamera/pipeline/simple/simple.cpp      | 52 +++++++++++++------
 src/libcamera/pipeline_handler.cpp            | 15 ++++++
 3 files changed, 52 insertions(+), 17 deletions(-)

-- 
2.47.2



More information about the libcamera-devel mailing list