libcamera: media_device: Move recursive lock handling to pipeline handler

The MediaDevice lock is meant to prevent concurrent usage of multiple
cameras from the same pipeline handlers. As media devices are acquired
by pipeline handlers, we can't have multiple pipeline handlers trying to
lock the same media device. The recursive locking detection can thus be
moved to the pipeline handler. This simplifies the media device
implementation that now implements true lock semantics, and prepares for
support of concurrent camera usage.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2021-08-29 21:03:23 +03:00
parent 46b32fa0e4
commit ec6921d7f7
4 changed files with 15 additions and 15 deletions

View file

@ -88,6 +88,8 @@ private:
const char *name_;
bool lockOwner_;
friend class PipelineHandlerFactory;
};