libcamera: pipeline_handler: Fatal if registering camera without media devices
Pipeline handlers must acquire media devices via PipelineHander::acquireMediaDevice so that the media devices can be registered with the pipeline handler, so that they can be automatically added to the devnum map for the v4l2 compatibility layer to use. Die fatally if any camera trying to be registered has not acquired any media devices via acquireMediaDevice. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -496,6 +496,10 @@ void PipelineHandler::registerCamera(std::shared_ptr<Camera> camera,
|
||||
cameraData_[camera.get()] = std::move(data);
|
||||
cameras_.push_back(camera);
|
||||
|
||||
if (mediaDevices_.empty())
|
||||
LOG(Pipeline, Fatal)
|
||||
<< "Registering camera with no media devices!";
|
||||
|
||||
/*
|
||||
* Walk the entity list and map the devnums of all capture video nodes
|
||||
* to the camera.
|
||||
|
||||
Reference in New Issue
Block a user