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

Pad structure. More...

#include <mpipe_pad.h>

Data Fields

struct mpipe_object object
 Base object.
enum mpipe_pad_direction direction
 Pad direction, cannot change after creating the pad.
enum mpipe_pad_presence presence
 Pad presence.
enum mpipe_pad_mode mode
 Operating mode.
struct mpipe_pad * peer
 Pointer to the peer pad this pad is linked to.
struct mpipe_structure caps
 Pad's capability.
atomic_t flushing
 Flushing gate.
int(* chain_fn )(struct mpipe_pad *pad, struct net_buf *in_buf, struct net_buf **out_buf)
 Chain function for handling buffers.
int(* query_fn )(struct mpipe_pad *pad, struct mpipe_dispatch *query)
 Query function for handling queries.
int(* event_fn )(struct mpipe_pad *pad, struct mpipe_dispatch *event)
 Event function for handling events.
int(* enum_caps_fn )(struct mpipe_pad *pad, uint32_t index, const struct mpipe_structure *filter, struct mpipe_structure *out)
 Enumerate the pad's supported caps one structure at a time into caller storage.

Detailed Description

Pad structure.

The pad structure represents a connection point of an element. Pads are used to negotiate capabilities and transfer data between elements.

Field Documentation

◆ caps

struct mpipe_structure mpipe_pad::caps

Pad's capability.

ANY until one is negotiated, reset back to ANY on PAUSED to READY

◆ chain_fn

int(* mpipe_pad::chain_fn) (struct mpipe_pad *pad, struct net_buf *in_buf, struct net_buf **out_buf)

Chain function for handling buffers.

Owns in_buf: on failure it releases it, and the caller must not touch the buffer afterwards.

◆ direction

enum mpipe_pad_direction mpipe_pad::direction

Pad direction, cannot change after creating the pad.

◆ enum_caps_fn

int(* mpipe_pad::enum_caps_fn) (struct mpipe_pad *pad, uint32_t index, const struct mpipe_structure *filter, struct mpipe_structure *out)

Enumerate the pad's supported caps one structure at a time into caller storage.

Lets an element whose capabilities come from a device produce them on demand instead of holding a structure for each. Defaults to producing the pad's own capability, and nothing past index 0.

It has to report -ENOENT once past its last capability: that is what ends every search walking it. The framework stops asking past UINT16_MAX, which no device comes near, so an implementation that never reports the end fails instead of hanging.

◆ event_fn

int(* mpipe_pad::event_fn) (struct mpipe_pad *pad, struct mpipe_dispatch *event)

Event function for handling events.

◆ flushing

atomic_t mpipe_pad::flushing

Flushing gate.

While set, buffers are dropped instead of chained

◆ mode

enum mpipe_pad_mode mpipe_pad::mode

Operating mode.

◆ object

struct mpipe_object mpipe_pad::object

Base object.

◆ peer

struct mpipe_pad* mpipe_pad::peer

Pointer to the peer pad this pad is linked to.

◆ presence

enum mpipe_pad_presence mpipe_pad::presence

Pad presence.

◆ query_fn

int(* mpipe_pad::query_fn) (struct mpipe_pad *pad, struct mpipe_dispatch *query)

Query function for handling queries.


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