|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
Elements that consume buffers, and end the stream. More...
Files | |
| file | mpipe_sink.h |
| Sink: an element that consumes buffers. | |
Data Structures | |
| struct | mpipe_sink |
| Sink Element Structure. More... | |
Enumerations | |
| enum | mpipe_prop_sink { MPIPE_PROP_SINK_LAST } |
| Properties for a sink element. More... | |
Functions | |
| int | mpipe_sink_init (struct mpipe_sink *sink, uint8_t id) |
| Initialize a sink element. | |
| int | mpipe_sink_change_state (struct mpipe_element *self, enum mpipe_state_change transition) |
| Change state function for the base sink element. | |
Elements that consume buffers, and end the stream.
A sink has one sink pad and no source pad: it is where data leaves the graph, onto a display, a file, or a codec. It is the simple end of both negotiations - it answers a capability query with the first format it supports that the offer allows, and it answers a buffer pool query by proposing what it needs, having nothing downstream to consult first.
A sink is also what reports the end of the stream. A graph with several sinks produces one end-of-stream message per sink, and the pipeline is what folds those into the single notification the application sees; see Pipelines.
| enum mpipe_prop_sink |
#include <mpipe_sink.h>
Properties for a sink element.
Enumeration of properties that can be configured for base sink
| Enumerator | |
|---|---|
| MPIPE_PROP_SINK_LAST | Last sink property marker (for validation/iteration). |
| int mpipe_sink_change_state | ( | struct mpipe_element * | self, |
| enum mpipe_state_change | transition ) |
#include <mpipe_sink.h>
Change state function for the base sink element.
On the PAUSED to READY transition this resets the negotiated pad caps back to ANY so a subsequent re-negotiation starts fresh. Derived sinks that override change_state must chain to this base function to inherit that behavior.
| self | Pointer to the Elements |
| transition | Transition state, see mpipe_state_change |
| int mpipe_sink_init | ( | struct mpipe_sink * | sink, |
| uint8_t | id ) |
#include <mpipe_sink.h>
Initialize a sink element.
Initializes the base sink element structure, sets up the sink pad, and configures default callbacks for query and event handling. A concrete sink calls it first from its own init, with the same id, and then overrides what it needs.
| sink | Pointer to the Sinks to initialize. |
| id | Unique element identifier. |