Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mpipe_dispatch Struct Reference

A query or an event traveling a pad link. More...

#include <mpipe_dispatch.h>

Data Fields

uint8_t type
 Dispatch type from mpipe_dispatch_type.
struct mpipe_structure * caps
 The capability carried, or NULL when the dispatch carries none.
struct mpipe_buffer_pool * pool
 Buffer pool its proposer makes available (not owned).
struct mpipe_buffer_pool_config pool_cfg
 A pool config proposed without a pool, negotiated by value.

Detailed Description

A query or an event traveling a pad link.

A dispatch travels a synchronous walk, so it references storage that outlives the walk instead of embedding a copy of everything it carries. It is declared with a designated initializer and has no init function - zero is the neutral value of every field:

struct mpipe_dispatch query = {
.caps = &caps_storage,
};
@ MPIPE_DISPATCH_CAPS
CAPS dispatch type.
Definition mpipe_dispatch.h:56
A query or an event traveling a pad link.
Definition mpipe_dispatch.h:77

Field Documentation

◆ caps

struct mpipe_structure* mpipe_dispatch::caps

The capability carried, or NULL when the dispatch carries none.

The creator points this at storage it owns for the whole walk; every other element reads through it and answers by copying INTO it. Repointing it at storage of your own dangles the moment your frame returns.

Value On a query (in/out storage) On an event (an announcement)
a capability the filter to answer within the format decided on
ANY no constraint: answer with all you support never send one
NULL caller error: nowhere to answer nothing to announce

A query function may dereference this without checking: a caps query carrying no storage is refused by mpipe_pad_query() with -EINVAL before any of them is called. An event handler must check, since NULL is a valid thing for an event to carry.

A caps event carrying none is a trigger rather than an announcement: a source that knows no format (a file source) still sends one, and the first element that does know one puts it in and announces it downstream.

◆ pool

struct mpipe_buffer_pool* mpipe_dispatch::pool

Buffer pool its proposer makes available (not owned).

◆ pool_cfg

struct mpipe_buffer_pool_config mpipe_dispatch::pool_cfg

A pool config proposed without a pool, negotiated by value.

◆ type

uint8_t mpipe_dispatch::type

Dispatch type from mpipe_dispatch_type.


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