libcamera: libcamera::MediaObject Class Reference

libcamera v0.7.2 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
libcamera::MediaObject Class Reference

Base class for all media objects. More...

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

## Public Member Functions
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.

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

## Protected Attributes
MediaDevice * | dev_
| 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] | dev | The media device this object belongs to
  [in] | id | The 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]

MediaDevice * libcamera::MediaObject::device | ( |  | ) |
| inline

Retrieve the media device the media object belongs to.

Returns
  The MediaDevice

## ◆ device() [2/2]

const MediaDevice * libcamera::MediaObject::device | ( |  | ) | const
| inline

Retrieve the media device the media object belongs to.

Returns
  The MediaDevice

## ◆ id()

unsigned int 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:

- include/libcamera/internal/media_object.h
- src/libcamera/media_object.cpp