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

Message ID 20240808173921.2519957-1-kieran.bingham@ideasonboard.com
Headers show
Series
  • pipeline: simple: Fix matching with an empty media graph
Related show

Message

Kieran Bingham Aug. 8, 2024, 5:39 p.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 first patch in this series removes the media variable from the pipeline
handler private data as it is not used after the match completes. This
could be later stored in the camera data if it is required on a per
camera basis.

The subsequent 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.

Paul Elder (2):
  pipeline: simple: Remove media member variable
  pipeline: simple: Fix matching with empty media graphs

 src/libcamera/pipeline/simple/simple.cpp | 63 +++++++++++++++---------
 1 file changed, 40 insertions(+), 23 deletions(-)