The MediaEntity represents an entity in the media graph.
More...
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().
◆ deviceMajor()
libcamera::MediaEntity::deviceMajor |
( |
| ) |
const |
|
inline |
Retrieve the major number of the interface associated with the entity.
- Returns
- The interface major number, or 0 if the entity isn't associated with an interface
◆ deviceMinor()
libcamera::MediaEntity::deviceMinor |
( |
| ) |
const |
|
inline |
Retrieve the minor number of the interface associated with the entity.
- Returns
- The interface minor number, or 0 if the entity isn't associated with an interface
◆ deviceNode()
libcamera::MediaEntity::deviceNode |
( |
| ) |
const |
|
inline |
Retrieve the entity's device node path, if any.
- Returns
- The entity's device node path, or an empty string if it is not set
- See also
- int setDeviceNode()
◆ flags()
libcamera::MediaEntity::flags |
( |
| ) |
const |
|
inline |
Retrieve the entity's flags.
Media entity flags are expressed using the MEDIA_ENT_FL_* macros defined by the Media Controller API.
- Returns
- The entity's flags
◆ function()
libcamera::MediaEntity::function |
( |
| ) |
const |
|
inline |
Retrieve the entity's main function.
Media entity functions are expressed using the MEDIA_ENT_F_* macros defined by the Media Controller API.
- Returns
- The entity's function
◆ getPadById()
const MediaPad * libcamera::MediaEntity::getPadById |
( |
unsigned int |
id | ) |
const |
Get a pad in this entity by its object id.
- Parameters
-
- Returns
- The pad identified by id, or nullptr if no such pad exist
◆ getPadByIndex()
const MediaPad * libcamera::MediaEntity::getPadByIndex |
( |
unsigned int |
index | ) |
const |
Get a pad in this entity by its index.
- Parameters
-
[in] | index | The 0-based pad index |
- Returns
- The pad identified by index, or nullptr if no such pad exist
◆ name()
libcamera::MediaEntity::name |
( |
| ) |
const |
|
inline |
Retrieve the entity name.
- Returns
- The entity name
◆ pads()
libcamera::MediaEntity::pads |
( |
| ) |
const |
|
inline |
Retrieve all pads of the entity.
- Returns
- The list of the entity's pads
◆ setDeviceNode()
int libcamera::MediaEntity::setDeviceNode |
( |
const std::string & |
deviceNode | ) |
|
Set the path to the device node for the associated interface.
- Parameters
-
[in] | deviceNode | The interface device node path associated with this entity |
- Returns
- 0 on success or a negative error code otherwise
The documentation for this class was generated from the following files:
- include/libcamera/internal/media_object.h
- src/libcamera/media_object.cpp