Zephyr Project API 4.5.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mpipe_transform Struct Reference

Transform element structure. More...

#include <mpipe_transform.h>

Data Fields

struct mpipe_element element
 Base element structure.
struct mpipe_pad sink_pad
 Sink pad for receiving input data.
struct mpipe_pad src_pad
 Source pad for sending output data.
struct mpipe_buffer_pool * in_pool
 Pointer to the input buffer pool for allocating input buffers.
struct mpipe_buffer_pool * out_pool
 Pointer to the output buffer pool for allocating output buffers.
enum mpipe_transform_mode mode
 Operating mode determining buffer handling strategy.
int(* set_caps )(struct mpipe_transform *self, enum mpipe_pad_direction direction, const struct mpipe_structure *caps)
 Apply the negotiated capability to one of the element's pads.
int(* transform_caps )(struct mpipe_transform *self, enum mpipe_pad_direction direction, const struct mpipe_structure *in, uint32_t index, struct mpipe_structure *out)
 Produce one transformation of a capability across the element.
int(* propose_buffer_pool )(struct mpipe_transform *self, struct mpipe_dispatch *query)
 Propose a buffer pool to upstream.
int(* decide_buffer_pool )(struct mpipe_transform *self, struct mpipe_dispatch *query)
 Decide the buffer pool for downstream.

Detailed Description

Transform element structure.

Base structure for all transform elements in the media pipeline. Transform elements process data from their sink pad and output the result to their source pad.

Field Documentation

◆ decide_buffer_pool

int(* mpipe_transform::decide_buffer_pool) (struct mpipe_transform *self, struct mpipe_dispatch *query)

Decide the buffer pool for downstream.

The downstream proposal is either an entire pool (the query's pool pointer; its config is the proposal) or a bare config (the query's pool_cfg). Apply a demand to a proposed pool only through mpipe_buffer_pool_set_config, which the pool may refuse - keep a fallback. An element deciding for its own pool rebuilds its config baseline here on every negotiation before absorbing the query's demands, so nothing accumulates across replays.

Parameters
selfPointer to the transform element
queryBuffer pool query (Dispatches)
Returns
0 on success, negative errno on failure

◆ element

struct mpipe_element mpipe_transform::element

Base element structure.

◆ in_pool

struct mpipe_buffer_pool* mpipe_transform::in_pool

Pointer to the input buffer pool for allocating input buffers.

◆ mode

enum mpipe_transform_mode mpipe_transform::mode

Operating mode determining buffer handling strategy.

◆ out_pool

struct mpipe_buffer_pool* mpipe_transform::out_pool

Pointer to the output buffer pool for allocating output buffers.

◆ propose_buffer_pool

int(* mpipe_transform::propose_buffer_pool) (struct mpipe_transform *self, struct mpipe_dispatch *query)

Propose a buffer pool to upstream.

The transform element may propose either its entire input buffer pool (set the query's pool pointer; the pool's own config is the proposal) or a bare config (write the query's pool_cfg). A proposed pool's ops are then intended to be called by the upstream element. Rebuild the pool's config from its requirement before proposing it: the live config is the previous negotiation's result, and proposing it as is accumulates peer demands across replays.

An in-place transform may use one pool for input and output. When that pool is proposed upstream, point mpipe_transform::in_pool at it and leave mpipe_transform::out_pool NULL, so the pool is configured and started by upstream only.

Parameters
selfPointer to the transform element
queryBuffer pool query (Dispatches)
Returns
0 on success, negative errno on failure

◆ set_caps

int(* mpipe_transform::set_caps) (struct mpipe_transform *self, enum mpipe_pad_direction direction, const struct mpipe_structure *caps)

Apply the negotiated capability to one of the element's pads.

Parameters
selfPointer to the transform element
directionDirection of the pad (mpipe_pad_direction)
capsCapability to apply (Capability Structure)
Returns
0 on success, negative errno on failure

◆ sink_pad

struct mpipe_pad mpipe_transform::sink_pad

Sink pad for receiving input data.

◆ src_pad

struct mpipe_pad mpipe_transform::src_pad

Source pad for sending output data.

◆ transform_caps

int(* mpipe_transform::transform_caps) (struct mpipe_transform *self, enum mpipe_pad_direction direction, const struct mpipe_structure *in, uint32_t index, struct mpipe_structure *out)

Produce one transformation of a capability across the element.

An element commonly maps a single input capability to several output ones: a decoder that can emit any of N pixel formats, a converter with N reachable formats. Those alternatives live on index rather than in a returned set, so a negotiation walks them one at a time and the fan out is never materialized.

Parameters
selfPointer to the transform element
directionDirection of the pad to transform the capability to (mpipe_pad_direction)
inCapability on the opposite pad to transform
indexIndex of the transformation to produce, starting at 0
[out]outCaller storage receiving the transformation
Returns
0 when out holds a transformation, another negative errno on failure
Return values
-EAGAINThis index produces none but a later one may
-ENOENTPast the last transformation

The documentation for this struct was generated from the following file: