mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-26 01:55:51 +03:00
libcamera: PipelineHandler: Move printing pipeline names to CameraManager
Since pipeline registration is done with declaring static factory objects, there is a risk that pipeline factories will be constructed before libcamera facilities are ready. For example, logging in the constructor of a pipeline handler factory may cause a segfault if threading isn't ready yet. Avoid this issue by moving printing the registration of the pipeline handler to the camera manager. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
1469d5e26e
commit
c57622d95f
2 changed files with 3 additions and 3 deletions
|
@ -142,6 +142,9 @@ void CameraManager::Private::createPipelineHandlers()
|
||||||
PipelineHandlerFactory::factories();
|
PipelineHandlerFactory::factories();
|
||||||
|
|
||||||
for (PipelineHandlerFactory *factory : factories) {
|
for (PipelineHandlerFactory *factory : factories) {
|
||||||
|
LOG(Camera, Debug)
|
||||||
|
<< "Found registered pipeline handler '"
|
||||||
|
<< factory->name() << "'";
|
||||||
/*
|
/*
|
||||||
* Try each pipeline handler until it exhaust
|
* Try each pipeline handler until it exhaust
|
||||||
* all pipelines it can provide.
|
* all pipelines it can provide.
|
||||||
|
|
|
@ -689,9 +689,6 @@ void PipelineHandlerFactory::registerType(PipelineHandlerFactory *factory)
|
||||||
std::vector<PipelineHandlerFactory *> &factories = PipelineHandlerFactory::factories();
|
std::vector<PipelineHandlerFactory *> &factories = PipelineHandlerFactory::factories();
|
||||||
|
|
||||||
factories.push_back(factory);
|
factories.push_back(factory);
|
||||||
|
|
||||||
LOG(Pipeline, Debug)
|
|
||||||
<< "Registered pipeline handler \"" << factory->name() << "\"";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue