[libcamera-devel] [RFC v1 0/2] MediaDevice enumeration helper
Naushir Patuck
naush at raspberrypi.com
Thu Jan 13 11:25:27 CET 2022
Hi,
As discussed some time back, I've created a helper to enumerate media device
topologies so we don't have to implement similar functions in each pipeline
handler.
Patch 1 adds a MediaDevice::enumerateMediaWalks() helper function that does
the enumeration and returns a vector of "MediaWalks" which pipeline handlers
may use to configure the media device topology. Patch 2 updates the RPi pipeline
handler to use this helper and remove the existing media device enumeration code.
I'm sure this may need to be tweaked for use in other pipeline handlers, and
getting feedback on this would be useful. The Simple pipeline handler is an
obvious candidate, and after having a brief look through the code, I think the
helper introduced here could simplify the Simple(!) pipeline handler as well.
However, before committing to changing that code over, I wanted to ensure I was
on the right path, and I don't have any means to test any of these changes on
other platforms.
Thanks,
Naush
Naushir Patuck (2):
libcamera: media_device: Add enumerateMediaWalks() helper
pipeline: raspberrypi: Use MediaDevice::enumerateMediaWalks()
include/libcamera/internal/media_device.h | 12 ++
src/libcamera/media_device.cpp | 135 +++++++++++++++++
.../pipeline/raspberrypi/raspberrypi.cpp | 142 ++++--------------
3 files changed, 179 insertions(+), 110 deletions(-)
--
2.25.1
More information about the libcamera-devel
mailing list