The MediaLink represents a link between two pads in the media graph.
More...
|
MediaPad * | source () const |
| Retrieve the link's source pad.
|
|
MediaPad * | sink () const |
| Retrieve the link's sink pad.
|
|
unsigned int | flags () const |
| Retrieve the link's flags.
|
|
int | setEnabled (bool enable) |
| Enable or disable a link.
|
|
std::string | toString () const |
| Generate a string representation of the MediaLink.
|
|
MediaDevice * | device () |
| Retrieve the media device the media object belongs to.
|
|
const MediaDevice * | device () const |
| Retrieve the media device the media object belongs to.
|
|
unsigned int | id () const |
| Retrieve the media object id.
|
|
The MediaLink represents a link between two pads in the media graph.
Links are created from the information provided by the Media Controller API in the media_v2_link structure. They reference the source() and sink() pads they connect and track the link status through link flags().
Each link is referenced in the link array of both of the pads it connect.
◆ flags()
unsigned int libcamera::MediaLink::flags |
( |
| ) |
const |
|
inline |
Retrieve the link's flags.
Link flags are a bitmask of flags defined by the Media Controller API MEDIA_LNK_FL_* macros.
- Returns
- The link flags
◆ setEnabled()
int libcamera::MediaLink::setEnabled |
( |
bool | enable | ) |
|
Enable or disable a link.
- Parameters
-
[in] | enable | True to enable the link, false to disable it |
Set the status of a link according to the value of enable. Links between two pads can be set to the enabled or disabled state freely, unless they're immutable links, whose status cannot be changed. Enabling an immutable link is not considered an error, while trying to disable it is.
Enabling a link establishes a data connection between two pads, while disabling it interrupts that connection.
- Returns
- 0 on success or a negative error code otherwise
◆ sink()
MediaPad * libcamera::MediaLink::sink |
( |
| ) |
const |
|
inline |
Retrieve the link's sink pad.
- Returns
- The sink pad at the destination of the link
◆ source()
MediaPad * libcamera::MediaLink::source |
( |
| ) |
const |
|
inline |
Retrieve the link's source pad.
- Returns
- The source pad at the origin of the link
◆ toString()
std::string libcamera::MediaLink::toString |
( |
| ) |
const |
Generate a string representation of the MediaLink.
- Returns
- A string representing the MediaLink
The documentation for this class was generated from the following files:
- include/libcamera/internal/media_object.h
- src/libcamera/media_object.cpp