libcamera  v0.3.1+12-19bbca3c
Supporting cameras in Linux since 2019
Public Member Functions | List of all members
libcamera::PipelineHandlerFactory< _PipelineHandler > Class Template Referencefinal

Registration of PipelineHandler classes and creation of instances. More...

Inheritance diagram for libcamera::PipelineHandlerFactory< _PipelineHandler >:
Inheritance graph
[legend]
Collaboration diagram for libcamera::PipelineHandlerFactory< _PipelineHandler >:
Collaboration graph
[legend]

Public Member Functions

 PipelineHandlerFactory (const char *name)
 Construct a pipeline handler factory. More...
 
std::unique_ptr< PipelineHandlercreateInstance (CameraManager *manager) const override
 Create an instance of the PipelineHandler corresponding to the factory. More...
 
- Public Member Functions inherited from libcamera::PipelineHandlerFactoryBase
 PipelineHandlerFactoryBase (const char *name)
 Construct a pipeline handler factory base. More...
 
std::shared_ptr< PipelineHandlercreate (CameraManager *manager) const
 Create an instance of the PipelineHandler corresponding to the factory. More...
 
const std::string & name () const
 Retrieve the factory name. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from libcamera::PipelineHandlerFactoryBase
static std::vector< PipelineHandlerFactoryBase * > & factories ()
 Retrieve the list of all pipeline handler factories. More...
 
static const PipelineHandlerFactoryBasegetFactoryByName (const std::string &name)
 Return the factory for the pipeline handler with name name. More...
 

Detailed Description

template<typename _PipelineHandler>
class libcamera::PipelineHandlerFactory< _PipelineHandler >

Registration of PipelineHandler classes and creation of instances.

Template Parameters
_PipelineHandlerThe pipeline handler class type for this factory

To facilitate discovery and instantiation of PipelineHandler classes, the PipelineHandlerFactory class implements auto-registration of pipeline handlers. Each PipelineHandler subclass shall register itself using the REGISTER_PIPELINE_HANDLER() macro, which will create a corresponding instance of a PipelineHandlerFactory and register it with the static list of factories.

Constructor & Destructor Documentation

◆ PipelineHandlerFactory()

template<typename _PipelineHandler >
libcamera::PipelineHandlerFactory< _PipelineHandler >::PipelineHandlerFactory ( const char *  name)
inline

Construct a pipeline handler factory.

Parameters
[in]nameName of the pipeline handler class

Creating an instance of the factory registers it with the global list of factories, accessible through the factories() function.

The factory name is used for debug purpose and shall be unique.

Member Function Documentation

◆ createInstance()

template<typename _PipelineHandler >
libcamera::PipelineHandlerFactory< _PipelineHandler >::createInstance ( CameraManager manager) const
inlineoverridevirtual

Create an instance of the PipelineHandler corresponding to the factory.

Parameters
[in]managerThe camera manager
Returns
A unique pointer to a newly constructed instance of the PipelineHandler subclass corresponding to the factory

Implements libcamera::PipelineHandlerFactoryBase.


The documentation for this class was generated from the following files: