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:
parent
ba3a1adc13
commit
0bc9286eb9
4 changed files with 71 additions and 50 deletions
|
@ -52,9 +52,9 @@ protected:
|
|||
ipaManager_ = make_unique<IPAManager>();
|
||||
|
||||
/* Create a pipeline handler for vimc. */
|
||||
const std::vector<PipelineHandlerFactory *> &factories =
|
||||
PipelineHandlerFactory::factories();
|
||||
for (const PipelineHandlerFactory *factory : factories) {
|
||||
const std::vector<PipelineHandlerFactoryBase *> &factories =
|
||||
PipelineHandlerFactoryBase::factories();
|
||||
for (const PipelineHandlerFactoryBase *factory : factories) {
|
||||
if (factory->name() == "PipelineHandlerVimc") {
|
||||
pipe_ = factory->create(nullptr);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue