libcamera: pipeline_handler: Implement factories through class templates
The REGISTER_PIPELINE_HANDLER() macro defines a class type that inherits from the PipelineHandlerFactory class, and implements a constructor and a createInstance() function. Replace the code generation through macro with the C++ equivalent, a class template, as done in libipa with the Algorithm and CameraSensorHelper factories. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -142,10 +142,10 @@ void CameraManager::Private::createPipelineHandlers()
|
||||
* file and only fallback on all handlers if there is no
|
||||
* configuration file.
|
||||
*/
|
||||
const std::vector<PipelineHandlerFactory *> &factories =
|
||||
PipelineHandlerFactory::factories();
|
||||
const std::vector<PipelineHandlerFactoryBase *> &factories =
|
||||
PipelineHandlerFactoryBase::factories();
|
||||
|
||||
for (const PipelineHandlerFactory *factory : factories) {
|
||||
for (const PipelineHandlerFactoryBase *factory : factories) {
|
||||
LOG(Camera, Debug)
|
||||
<< "Found registered pipeline handler '"
|
||||
<< factory->name() << "'";
|
||||
|
||||
Reference in New Issue
Block a user