libcamera: libcamera::ConverterFactoryBase Class Reference

libcamera v0.0.4 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
libcamera::ConverterFactoryBase Class Referenceabstract

Base class for converter factories. More...

Inheritance diagram for libcamera::ConverterFactoryBase:
[legend]

## Public Member Functions
| ConverterFactoryBase (const std::string name, std::initializer_list< std::string > compatibles)
| Construct a converter factory base.
const std::vector< std::string > & | compatibles () const

## Static Public Member Functions
static std::unique_ptr< Converter > | create (MediaDevice *media)
| Create an instance of the converter corresponding to a named factory.
static std::vector< ConverterFactoryBase * > & | factories ()
| Retrieve the list of all converter factories.
static std::vector< std::string > | names ()
| Retrieve the list of all converter factory names.

## Detailed Description

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.

## Constructor & Destructor Documentation

## ◆ 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.

## Member Function Documentation

## ◆ compatibles()

libcamera::ConverterFactoryBase::compatibles | ( |  | ) | const
| inline

Returns
  The names compatibles

## ◆ create()

std::unique_ptr< Converter > libcamera::ConverterFactoryBase::create | ( | MediaDevice * | media | ) |
| static

Create an instance of the converter corresponding to a named factory.

Parameters

  [in] | media | Name of the factory

Returns
  A unique pointer to a new instance of the converter subclass corresponding to the named factory or one of its alias. Otherwise a null pointer if no such factory exists

## ◆ factories()

std::vector< ConverterFactoryBase * > & libcamera::ConverterFactoryBase::factories | ( |  | ) |
| static

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