[libcamera-devel] [PATCH 0/2] Support resource acquisition at 'acquire()'

Kieran Bingham kieran.bingham at ideasonboard.com
Wed Nov 16 01:17:22 CET 2022


Pipeline handlers may benefit from being able to postpone resource
acquisition until the acquire() operation, or even release any temporary
resources used during initialisation and only use them when acquired.

This series hopes to balance the updates to the
PipelineHandler->release(Camera) call, with a corresponding
PipelineHandler->acquire(camera) and facilitate pipeline handlers
managing resources only when the camera is in use.

While the pipeline patch could make some progress, the uvcvideo patch in
this series is not working. I fear this may be a symptom of a bug in
either our thread or fdNotifier / event mechanisms, but haven't been
able to track it down yet.

Kieran Bingham (2):
  libcamera: pipeline: Add an acquireDevice method
  [DNI/RFC] pipeline: uvcvideo: Only open devices upon acquire

 include/libcamera/internal/pipeline_handler.h |  3 +-
 src/libcamera/camera.cpp                      |  2 +-
 src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  | 55 +++++++++++++++----
 src/libcamera/pipeline_handler.cpp            | 23 +++++++-
 4 files changed, 69 insertions(+), 14 deletions(-)

-- 
2.34.1



More information about the libcamera-devel mailing list