libcamera  v0.2.0+150-2031e2f2
Supporting cameras in Linux since 2019
Public Member Functions | Friends | List of all members
libcamera::MediaPad Class Reference

The MediaPad represents a pad of an entity in the media graph. More...

Inheritance diagram for libcamera::MediaPad:
Inheritance graph
[legend]
Collaboration diagram for libcamera::MediaPad:
Collaboration graph
[legend]

Public Member Functions

unsigned int index () const
 Retrieve the pad index. More...
 
MediaEntityentity () 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
MediaDevicedevice ()
 Retrieve the media device the media object belongs to. More...
 
const MediaDevicedevice () 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
MediaDevicedev_
 The media device the media object belongs to.
 
unsigned int id_
 The media object id.
 

Detailed Description

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.

Member Function Documentation

◆ addLink()

void libcamera::MediaPad::addLink ( MediaLink link)

Add a new link to this pad.

Parameters
[in]linkThe MediaLink to add

◆ entity()

libcamera::MediaPad::entity ( ) const
inline

Retrieve the entity the pad belongs to.

Returns
The MediaEntity the pad belongs to

◆ flags()

libcamera::MediaPad::flags ( ) const
inline

Retrieve the pad flags.

Pad flags are a bitmask of flags defined by the Media Controller API MEDIA_PAD_FL_* macros.

Returns
The pad flags

◆ index()

libcamera::MediaPad::index ( ) const
inline

Retrieve the pad index.

Returns
The 0-based pad index identifying the pad in the context of the entity it belongs to

◆ links()

libcamera::MediaPad::links ( ) const
inline

Retrieve all links in the pad.

Returns
A list of links connected to the pad

The documentation for this class was generated from the following files: