libcamera
v0.3.1+12-19bbca3c
Supporting cameras in Linux since 2019
|
The MediaLink represents a link between two pads in the media graph. More...
Public Member Functions | |
MediaPad * | source () const |
Retrieve the link's source pad. More... | |
MediaPad * | sink () const |
Retrieve the link's sink pad. More... | |
unsigned int | flags () const |
Retrieve the link's flags. More... | |
int | setEnabled (bool enable) |
Enable or disable a link. More... | |
Public Member Functions inherited from libcamera::MediaObject | |
MediaDevice * | device () |
Retrieve the media device the media object belongs to. More... | |
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 | |
Protected Member Functions inherited from libcamera::MediaObject | |
MediaObject (MediaDevice *dev, unsigned int id) | |
Construct a MediaObject part of the MediaDevice dev, identified by the id unique within the device. More... | |
Protected Attributes inherited from libcamera::MediaObject | |
MediaDevice * | dev_ |
The media device the media object belongs to. | |
unsigned int | id_ |
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.
|
inline |
Retrieve the link's flags.
Link flags are a bitmask of flags defined by the Media Controller API MEDIA_LNK_FL_* macros.
int libcamera::MediaLink::setEnabled | ( | bool | enable | ) |
Enable or disable a link.
[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.
|
inline |
Retrieve the link's sink pad.
|
inline |
Retrieve the link's source pad.