libcamera v0.5.1 Supporting cameras in Linux since 2019 |

Loading...
Searching...
No Matches
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 >:
[legend]
Collaboration diagram for libcamera::PipelineHandlerFactory< _PipelineHandler >:
[legend]

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

## Additional Inherited Members
Static Public Member Functions inherited from libcamera::PipelineHandlerFactoryBase
static std::vector< PipelineHandlerFactoryBase * > & | factories ()
| Retrieve the list of all pipeline handler factories.
static const PipelineHandlerFactoryBase * | getFactoryByName (const std::string &name)
| Return the factory for the pipeline handler with name name.

## Detailed Description

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

Registration of PipelineHandler classes and creation of instances.

Template Parameters

  _PipelineHandler | The 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] | name | Name 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>

std::unique_ptr< PipelineHandler > libcamera::PipelineHandlerFactory< _PipelineHandler >::createInstance | ( | CameraManager * | manager | ) | const
| inline override virtual

Create an instance of the PipelineHandler corresponding to the factory.

Parameters

  [in] | manager | The 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:

- include/libcamera/internal/pipeline_handler.h
- src/libcamera/pipeline_handler.cpp