Base class for converter factories.
More...
Base class for converter factories.
The ConverterFactoryBase class is the base of all specializations of the ConverterFactory class template. It implements the factory registration, maintains a registry of factories, and provides access to the registered factories.
◆ ConverterFactoryBase()
libcamera::ConverterFactoryBase::ConverterFactoryBase |
( |
const std::string |
name, |
|
|
std::initializer_list< std::string > |
compatibles |
|
) |
| |
Construct a converter factory base.
- Parameters
-
[in] | name | Name of the converter class |
[in] | compatibles | Name aliases of the converter class |
Creating an instance of the factory base registers it with the global list of factories, accessible through the factories() function.
The factory name is used as unique identifier. If the converter implementation fully relies on a generic framework, the name should be the same as the framework. Otherwise, if the implementation is specialized, the factory name should match the driver name implementing the function.
The factory compatibles holds a list of driver names implementing a generic subsystem without any personalizations.
◆ compatibles()
libcamera::ConverterFactoryBase::compatibles |
( |
| ) |
const |
|
inline |
- Returns
- The list of compatible name aliases of the converter
◆ create()
Create an instance of the converter corresponding to the media device.
- Parameters
-
[in] | media | The media device to create the converter for |
The converter is created by matching the factory name or any of its compatible aliases with the media device driver name.
- Returns
- A new instance of the converter subclass corresponding to the media device, or null if the media device driver name doesn't match anything
◆ factories()
Retrieve the list of all converter factories.
- Returns
- The list of converter factories
◆ names()
std::vector< std::string > libcamera::ConverterFactoryBase::names |
( |
| ) |
|
|
static |
Retrieve the list of all converter factory names.
- Returns
- The list of all converter factory names
The documentation for this class was generated from the following files:
- include/libcamera/internal/converter.h
- src/libcamera/converter.cpp