libcamera v0.0.1
Supporting cameras in Linux since 2019
|
The MediaEntity represents an entity in the media graph. More...
Public Types | |
enum class | Type { Invalid , MediaEntity , V4L2Subdevice , V4L2VideoDevice } |
The type of the interface exposed by the entity to userspace. More... | |
Public Member Functions | |
const std::string & | name () const |
Retrieve the entity name. More... | |
unsigned int | function () const |
Retrieve the entity's main function. More... | |
unsigned int | flags () const |
Retrieve the entity's flags. More... | |
Type | type () const |
Retrieve the entity's type. More... | |
const std::string & | deviceNode () const |
Retrieve the entity's device node path, if any. More... | |
unsigned int | deviceMajor () const |
Retrieve the major number of the interface associated with the entity. More... | |
unsigned int | deviceMinor () const |
Retrieve the minor number of the interface associated with the entity. More... | |
const std::vector< MediaPad * > & | pads () const |
Retrieve all pads of the entity. More... | |
const std::vector< MediaEntity * > | ancillaryEntities () const |
Retrieve all ancillary entities of the entity. More... | |
const MediaPad * | getPadByIndex (unsigned int index) const |
Get a pad in this entity by its index. More... | |
const MediaPad * | getPadById (unsigned int id) const |
Get a pad in this entity by its object id. More... | |
int | setDeviceNode (const std::string &deviceNode) |
Set the path to the device node for the associated interface. More... | |
![]() | |
MediaDevice * | device () |
const MediaDevice * | device () const |
Retrieve the media device the media object belongs to. More... | |
unsigned int | id () const |
Retrieve the media object id. More... | |
Friends | |
class | MediaDevice |
Additional Inherited Members | |
![]() | |
MediaObject (MediaDevice *dev, unsigned int id) | |
Construct a MediaObject part of the MediaDevice dev, identified by the id unique within the device. More... | |
![]() | |
MediaDevice * | dev_ |
The media device the media object belongs to. | |
unsigned int | id_ |
The media object id. | |
The MediaEntity represents an entity in the media graph.
Entities are created from the information provided by the Media Controller API in the media_v2_entity structure. They reference the pads() they contain.
In addition to their graph id, media graph entities are identified by a name() unique in the media device context. They implement a function() and may expose a deviceNode().
|
strong |
The type of the interface exposed by the entity to userspace.
|
inline |
Retrieve all ancillary entities of the entity.
|
inline |
Retrieve the major number of the interface associated with the entity.
|
inline |
Retrieve the minor number of the interface associated with the entity.
|
inline |
Retrieve the entity's device node path, if any.
|
inline |
Retrieve the entity's flags.
Media entity flags are expressed using the MEDIA_ENT_FL_* macros defined by the Media Controller API.
|
inline |
Retrieve the entity's main function.
Media entity functions are expressed using the MEDIA_ENT_F_* macros defined by the Media Controller API.
const MediaPad * libcamera::MediaEntity::getPadById | ( | unsigned int | id | ) | const |
Get a pad in this entity by its object id.
[in] | id | The pad id |
const MediaPad * libcamera::MediaEntity::getPadByIndex | ( | unsigned int | index | ) | const |
Get a pad in this entity by its index.
[in] | index | The 0-based pad index |
|
inline |
Retrieve the entity name.
|
inline |
Retrieve all pads of the entity.
int libcamera::MediaEntity::setDeviceNode | ( | const std::string & | deviceNode | ) |
Set the path to the device node for the associated interface.
[in] | deviceNode | The interface device node path associated with this entity |
|
inline |
Retrieve the entity's type.
The entity type identifies the type of interface exposed to userspace.