Loading...
Searching...
No Matches
media_pipeline.h
Go to the documentation of this file.
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2024, Ideas on Board Oy
*
* Media pipeline support
*/
#pragma once
#include <list>
#include <string>
#include <libcamera/base/log.h>
namespace libcamera {
class CameraSensor;
class MediaEntity;
class MediaLink;
class MediaPad;
struct V4L2SubdeviceFormat;
class MediaPipeline
{
public:
struct Entity {
MediaEntity *entity;
bool supportsRouting;
const MediaPad *sink;
const MediaPad *source;
MediaLink *sourceLink;
};
int init(MediaEntity *source, std::string_view sink);
int initLinks();
int configure(CameraSensor *sensor, V4L2SubdeviceFormat *);
const std::list<Entity> &entities() const { return entities_; }
private:
std::list<Entity> entities_;
};
} /* namespace libcamera */
libcamera::CameraSensor
A abstract camera sensor.
Definition camera_sensor.h:40
libcamera::MediaEntity
The MediaEntity represents an entity in the media graph.
Definition media_object.h:97
libcamera::MediaLink
The MediaLink represents a link between two pads in the media graph.
Definition media_object.h:44
libcamera::MediaPad
The MediaPad represents a pad of an entity in the media graph.
Definition media_object.h:69
libcamera::MediaPipeline
The MediaPipeline represents a set of entities that together form a data path for stream data.
Definition media_pipeline.h:24
libcamera::MediaPipeline::configure
int configure(CameraSensor *sensor, V4L2SubdeviceFormat *)
Configure the entities of this MediaPipeline.
Definition media_pipeline.cpp:295
libcamera::MediaPipeline::entities
const std::list< Entity > & entities() const
Retrieve list of entities composing the media pipeline.
Definition media_pipeline.h:38
libcamera::MediaPipeline::init
int init(MediaEntity *source, std::string_view sink)
Find the path from source to sink.
Definition media_pipeline.cpp:151
libcamera::MediaPipeline::initLinks
int initLinks()
Initialise and enable all links through the MediaPipeline.
Definition media_pipeline.cpp:261
log.h
Logging infrastructure.
libcamera
Top-level libcamera namespace.
Definition backtrace.h:17
libcamera::MediaPipeline::Entity
A node composing the media pipeline.
Definition media_pipeline.h:26
libcamera::MediaPipeline::Entity::entity
MediaEntity * entity
Pointer to the libcamera::MediaEntity, always valid.
Definition media_pipeline.h:27
libcamera::MediaPipeline::Entity::supportsRouting
bool supportsRouting
Whether or not the entity is a subdev that supports the routing API.
Definition media_pipeline.h:28
libcamera::MediaPipeline::Entity::sink
const MediaPad * sink
The local libcamera::MediaPad sink pad connected to the upstream entity, null for the camera sensor a...
Definition media_pipeline.h:29
libcamera::MediaPipeline::Entity::sourceLink
MediaLink * sourceLink
The link on the libcamera::MediaLink source pad, to the downstream entity, null for the last node at ...
Definition media_pipeline.h:31
libcamera::MediaPipeline::Entity::source
const MediaPad * source
The local libcamera::MediaPad source pad connected to the upstream entity, null for the last node at ...
Definition media_pipeline.h:30
libcamera::V4L2SubdeviceFormat
The V4L2 sub-device image format and sizes.
Definition v4l2_subdevice.h:65