libcamera  v0.3.0
Supporting cameras in Linux since 2019
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
libcamera::MediaObject Class Reference

Base class for all media objects. More...

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

Public Member Functions

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...
 

Protected Member Functions

 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

MediaDevicedev_
 The media device the media object belongs to.
 
unsigned int id_
 The media object id.
 

Friends

class MediaDevice
 

Detailed Description

Base class for all media objects.

MediaObject is an abstract base class for all media objects in the media graph. Each object is identified by a reference to the media device it belongs to and a unique id within that media device. This base class provide helpers to media objects to keep track of these identifiers.

See also
MediaEntity, MediaPad, MediaLink

Constructor & Destructor Documentation

◆ MediaObject()

libcamera::MediaObject::MediaObject ( MediaDevice dev,
unsigned int  id 
)
inlineprotected

Construct a MediaObject part of the MediaDevice dev, identified by the id unique within the device.

Parameters
[in]devThe media device this object belongs to
[in]idThe media object id

The caller shall ensure unicity of the object id in the media device context. This constraint is neither enforced nor checked by the MediaObject.

Member Function Documentation

◆ device() [1/2]

libcamera::MediaObject::device ( )
inline

Retrieve the media device the media object belongs to.

Returns
The MediaDevice

◆ device() [2/2]

libcamera::MediaObject::device ( ) const
inline

Retrieve the media device the media object belongs to.

Returns
The MediaDevice

◆ id()

libcamera::MediaObject::id ( ) const
inline

Retrieve the media object id.

Returns
The media object id

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