|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
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 *transform, enum mpipe_pad_direction direction, const struct mpipe_structure *caps) |
| Set a given caps to an element's pad. | |
| 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. | |
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.
| 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.
| self | Pointer to the transform element |
| query | Allocation query (Dispatches) |
| struct mpipe_element mpipe_transform::element |
Base element structure.
| struct mpipe_buffer_pool* mpipe_transform::in_pool |
Pointer to the input buffer pool for allocating input buffers.
| enum mpipe_transform_mode mpipe_transform::mode |
Operating mode determining buffer handling strategy.
| struct mpipe_buffer_pool* mpipe_transform::out_pool |
Pointer to the output buffer pool for allocating output buffers.
| 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. Before proposing a pool, rebuild its config baseline from your source of truth: the live config is the previous negotiation's applied result, and proposing it as-is makes peer demands accumulate across replays.
For in-place transform, the same pool may be used for both input and output. If the pool is proposed to upstream, the element has to use mpipe_transform::in_pool to point to the pool and leave mpipe_transform::out_pool as NULL so that the pool is configured / started only by the upstream and not by the transform element itself.
| self | Pointer to the transform element |
| query | Allocation query (Dispatches) |
| int(* mpipe_transform::set_caps) (struct mpipe_transform *transform, enum mpipe_pad_direction direction, const struct mpipe_structure *caps) |
Set a given caps to an element's pad.
| transform | Pointer to the transform element |
| direction | Direction of the pad (mpipe_pad_direction) |
| caps | Capability to set (Capability Structure) |
| struct mpipe_pad mpipe_transform::sink_pad |
Sink pad for receiving input data.
| struct mpipe_pad mpipe_transform::src_pad |
Source pad for sending output data.
| 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.
| self | Pointer to the transform element | |
| direction | Direction of the pad to transform the capability to (mpipe_pad_direction) | |
| in | Capability on the opposite pad to transform | |
| index | Index of the transformation to produce, starting at 0 | |
| [out] | out | Caller storage receiving the transformation |
out holds a transformation, another negative errno on failure | -EAGAIN | This index produces none but a later one may |
| -ENOENT | Past the last transformation |