libcamera: Remove PipelineHandler Fatal check of non-empty MediaDevices
The Fatal check of having at least one MediaDevice was to prevent pipeline handler implementations searching and owning media devices with custom conventions, instead of using the base function |acquireMediaDevice|. It also has the assumption that there's at least one media device to make a camera work. Now that the assumption will be broken by the virtual pipeline handler added in the following patches, and developers should be aware of the available functions in the base class to handle media devices, the Fatal check is no longer needed. Signed-off-by: Harvey Yang <chenghaoyang@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
168488275a
commit
670bbf3dc2
1 changed files with 8 additions and 3 deletions
|
@ -646,9 +646,14 @@ void PipelineHandler::registerCamera(std::shared_ptr<Camera> camera)
|
|||
{
|
||||
cameras_.push_back(camera);
|
||||
|
||||
if (mediaDevices_.empty())
|
||||
LOG(Pipeline, Fatal)
|
||||
<< "Registering camera with no media devices!";
|
||||
if (mediaDevices_.empty()) {
|
||||
/*
|
||||
* For virtual devices with no MediaDevice, there are no system
|
||||
* devices to register.
|
||||
*/
|
||||
manager_->_d()->addCamera(std::move(camera));
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Walk the entity list and map the devnums of all capture video nodes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue