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

Message ID 20250326084800.1880530-1-paul.elder@ideasonboard.com
Headers show
Series
  • pipeline: simple: Fix matching with an empty media graph
Related show

Message

Paul Elder March 26, 2025, 8:47 a.m. UTC
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(-)