libcamera
v0.3.1+12-19bbca3c
Supporting cameras in Linux since 2019
|
The MediaPad represents a pad of an entity in the media graph. More...
Public Member Functions | |
unsigned int | index () const |
Retrieve the pad index. More... | |
MediaEntity * | entity () const |
Retrieve the entity the pad belongs to. More... | |
unsigned int | flags () const |
Retrieve the pad flags. More... | |
const std::vector< MediaLink * > & | links () const |
Retrieve all links in the pad. More... | |
void | addLink (MediaLink *link) |
Add a new link to this pad. 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 MediaPad represents a pad of an entity in the media graph.
Pads are created from the information provided by the Media Controller API in the media_v2_pad structure. They reference the entity() they belong to.
In addition to their graph id, media graph pads are identified by an index unique in the context of the entity the pad belongs to.
A pad can be either a 'source' pad or a 'sink' pad. This information is captured in the pad flags().
Pads are connected through links. Links originating from a source pad are outbound links, and links arriving at a sink pad are inbound links. Pads reference all the links() that are connected to them.
void libcamera::MediaPad::addLink | ( | MediaLink * | link | ) |
Add a new link to this pad.
[in] | link | The MediaLink to add |
|
inline |
Retrieve the entity the pad belongs to.
|
inline |
Retrieve the pad flags.
Pad flags are a bitmask of flags defined by the Media Controller API MEDIA_PAD_FL_* macros.
|
inline |
Retrieve the pad index.
|
inline |
Retrieve all links in the pad.