libcamera v0.5.1
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
media_pipeline.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2024, Ideas on Board Oy
4 *
5 * Media pipeline support
6 */
7
8#pragma once
9
10#include <list>
11#include <string>
12
13#include <libcamera/base/log.h>
14
15namespace libcamera {
16
17class CameraSensor;
18class MediaEntity;
19class MediaLink;
20class MediaPad;
22
24{
25public:
26 int init(MediaEntity *source, std::string_view sink);
27 int initLinks();
29
30private:
31 struct Entity {
32 /* The media entity, always valid. */
33 MediaEntity *entity;
34 /*
35 * Whether or not the entity is a subdev that supports the
36 * routing API.
37 */
38 bool supportsRouting;
39 /*
40 * The local sink pad connected to the upstream entity, null for
41 * the camera sensor at the beginning of the pipeline.
42 */
43 const MediaPad *sink;
44 /*
45 * The local source pad connected to the downstream entity, null
46 * for the video node at the end of the pipeline.
47 */
48 const MediaPad *source;
49 /*
50 * The link on the source pad, to the downstream entity, null
51 * for the video node at the end of the pipeline.
52 */
53 MediaLink *sourceLink;
54 };
55
56 std::list<Entity> entities_;
57};
58
59} /* namespace libcamera */
A abstract camera sensor.
Definition camera_sensor.h:39
The MediaEntity represents an entity in the media graph.
Definition media_object.h:97
The MediaPad represents a pad of an entity in the media graph.
Definition media_object.h:69
The MediaPipeline represents a set of entities that together form a data path for stream data.
Definition media_pipeline.h:24
int configure(CameraSensor *sensor, V4L2SubdeviceFormat *)
Configure the entities of this MediaPipeline.
Definition media_pipeline.cpp:249
int init(MediaEntity *source, std::string_view sink)
Find the path from source to sink.
Definition media_pipeline.cpp:105
int initLinks()
Initialise and enable all links through the MediaPipeline.
Definition media_pipeline.cpp:215
Logging infrastructure.
Top-level libcamera namespace.
Definition backtrace.h:17
The V4L2 sub-device image format and sizes.
Definition v4l2_subdevice.h:64