libcamera: libcamera::MediaPipeline Class Reference

libcamera v0.7.1 Supporting cameras in Linux since 2019

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

The MediaPipeline represents a set of entities that together form a data path for stream data. More...

## Classes
struct | Entity
| A node composing the media pipeline. More...

## Public Member Functions
int | init (MediaEntity *source, std::string_view sink)
| Find the path from source to sink.
int | initLinks ()
| Initialise and enable all links through the MediaPipeline.
int | configure (CameraSensor *sensor, V4L2SubdeviceFormat *)
| Configure the entities of this MediaPipeline.
const std::list< Entity > & | entities () const
| Retrieve list of entities composing the media pipeline.

## Detailed Description

The MediaPipeline represents a set of entities that together form a data path for stream data.

A MediaPipeline instance is constructed from a sink and a source between two entities in a media graph.

## Member Function Documentation

## ◆ configure()

int libcamera::MediaPipeline::configure | ( | CameraSensor * | sensor,
|  | V4L2SubdeviceFormat * | format )

Configure the entities of this MediaPipeline.

Propagate formats through each of the entities of the Pipeline, validating that each one was not adjusted by the driver from the desired format.

Returns
  0 on success or a negative errno otherwise

## ◆ entities()

const std::list< Entity > & libcamera::MediaPipeline::entities | ( |  | ) | const
| inline

Retrieve list of entities composing the media pipeline.

Returns
  The list of MediaPipeline::Entity entities composing the media pipeline

## ◆ init()

int libcamera::MediaPipeline::init | ( | MediaEntity * | source,
|  | std::string_view | sink )

Find the path from source to sink.

Starting from a source entity, determine the shortest path to the target described by sink.

If sink can not be found, or a route from source to sink can not be achieved an error of -ENOLINK will be returned.

When successful, the MediaPipeline will internally store the representation of entities and links to describe the path between the two entities.

Returns
  0 on success, a negative errno otherwise

## ◆ initLinks()

int libcamera::MediaPipeline::initLinks | ( |  | ) |

Initialise and enable all links through the MediaPipeline.

Returns
  0 on success, or a negative errno otherwise

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

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