libcamera  v0.4.0+65-9834402f
Supporting cameras in Linux since 2019
Public Member Functions | List of all members
libcamera::CameraSensorFactory< _CameraSensor > Class Template Referencefinal

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

Inheritance diagram for libcamera::CameraSensorFactory< _CameraSensor >:
Inheritance graph
[legend]
Collaboration diagram for libcamera::CameraSensorFactory< _CameraSensor >:
Collaboration graph
[legend]

Public Member Functions

 CameraSensorFactory (const char *name, int priority)
 Construct a camera sensor factory. More...
 
- Public Member Functions inherited from libcamera::CameraSensorFactoryBase
 CameraSensorFactoryBase (const char *name, int priority)
 Construct a camera sensor factory base. More...
 
const std::string & name () const
 Retrieve the camera sensor factory name. More...
 
int priority () const
 Retrieve the priority value for the factory. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from libcamera::CameraSensorFactoryBase
static std::unique_ptr< CameraSensorcreate (MediaEntity *entity)
 Create an instance of the CameraSensor corresponding to a media entity. More...
 

Detailed Description

template<typename _CameraSensor>
class libcamera::CameraSensorFactory< _CameraSensor >

Registration of CameraSensorFactory classes and creation of instances.

Template Parameters
_CameraSensorThe camera sensor class type for this factory

To facilitate discovery and instantiation of CameraSensor classes, the CameraSensorFactory class implements auto-registration of camera sensors. Each CameraSensor subclass shall register itself using the REGISTER_CAMERA_SENSOR() macro, which will create a corresponding instance of a CameraSensorFactory subclass and register it with the static list of factories.

Constructor & Destructor Documentation

◆ CameraSensorFactory()

template<typename _CameraSensor >
libcamera::CameraSensorFactory< _CameraSensor >::CameraSensorFactory ( const char *  name,
int  priority 
)
inline

Construct a camera sensor factory.

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


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