![]() |
Maestro Audio Framework
v 1.7
NXP Semiconductors
|
This file contains the definition of an element pad object. More...
Data Structures | |
| struct | StreamEvent |
| struct | StreamPad |
| struct | PadSrc |
| struct | PadSink |
Macros | |
| #define | BUFFER_PTR(pstbuffer) ((pstbuffer)->buffer) |
| Get buffer pointer. | |
| #define | BUFFER_SIZE(pstbuffer) ((pstbuffer)->size) |
| Get buffer size. | |
| #define | BUFFER_OFFSET(pstbuffer) ((pstbuffer)->offset) |
| Get buffer offset. | |
| #define | BUFFER_TIME(pstbuffer) ((pstbuffer)->time) |
| Get time. | |
| #define | EVENT_TYPE_BOTH (EVENT_TYPE_UPSTREAM | EVENT_TYPE_DOWNSTREAM) |
| The same thing as EVENT_TYPE_UPSTREAM | EVENT_TYPE_DOWNSTREAM. | |
| #define | EVENT_TYPE_SHIFT 4 |
| Shift for custom event type creation. | |
| #define | EVENT_MAKE_TYPE(num, flags) (((num) << EVENT_TYPE_SHIFT) | (flags)) |
| #define | FLAG(name) EVENT_TYPE_##name |
| Event type flag creation. | |
| #define | EVENT_IS_UPSTREAM(ev) ((uint32_t)EVENT_TYPE(ev) & (uint32_t)EVENT_TYPE_UPSTREAM) |
| #define | EVENT_IS_DOWNSTREAM(ev) ((uint32_t)EVENT_TYPE(ev) & (uint32_t)EVENT_TYPE_DOWNSTREAM) |
| #define | EVENT_IS_SERIALIZED(ev) ((uint32_t)EVENT_TYPE(ev) & (uint32_t)EVENT_TYPE_SERIALIZED) |
| #define | EVENT_TYPE(pstevent) ((pstevent)->type) |
| Get event type. | |
| #define | EVENT_FORMAT(pstevent) ((pstevent)->format) |
| Get event format. | |
| #define | EVENT_DATA(pstevent) ((pstevent)->data) |
| Get event data. | |
| #define | QUERY_TYPE(pStreamQuery) ((pStreamQuery)->type) |
| Get query type. | |
| #define | QUERY_FORMAT(pStreamQuery) ((pStreamQuery)->format) |
| Get query format. | |
| #define | QUERY_DATATYPE(pStreamQuery) ((pStreamQuery)->data_type) |
| Get query data type. | |
| #define | QUERY_DATA(pStreamQuery) ((pStreamQuery)->data) |
| Get query data. | |
| #define | MEMBERS_PAD |
| Generic pad. More... | |
| #define | PAD_PARENT_ELEMENT(pstpad) ((StreamElement *)((pstpad)->parent)) |
| Get pad parent element. | |
| #define | PAD_PARENT_PIPELINE(pstpad) ((Pipeline *)((PAD_PARENT_ELEMENT(pstpad))->parent)) |
| Get pad parent pipeline. | |
| #define | PAD_PARENT(pstpad) ((pstpad)->parent) |
| Get pad parent. | |
| #define | PAD_TYPE(pstpad) ((pstpad)->type) |
| Get pad type. | |
| #define | PAD_SCHEDULING(pstpad) ((pstpad)->scheduling) |
| Get pad scheduling. | |
| #define | PAD_PEER(pstpad) ((pstpad)->peer) |
| Get pad peer. | |
| #define | PAD_IS_FLUSHING(pstpad) ((pstpad)->flushing) |
| Get pad flushing. | |
| #define | PAD_SET_FLUSHING(pstpad) ((pstpad)->flushing = true) |
| Set pad flushing. | |
| #define | PAD_CLEAR_FLUSHING(pstpad) ((pstpad)->flushing = false) |
| Clear pad flushing. | |
| #define | PAD_IS_ACTIVATED(pstpad) ((pstpad)->activated) |
| Get pad activated. | |
| #define | PAD_SET_ACTIVATED(pstpad) ((pstpad)->activated = true) |
| Set pad activated. | |
| #define | PAD_CLEAR_ACTIVATED(pstpad) ((pstpad)->activated = false) |
| Clear pad activated. | |
| #define | PAD_ACTIVATEFUNC(pstpad) ((pstpad)->activation_handler) |
| Get pad activation handler. | |
| #define | PAD_ACTIVATEPULLFUNC(pstpad) ((pstpad)->activate_pull) |
| Get pad activate pull function. | |
| #define | PAD_ACTIVATEPUSHFUNC(pstpad) ((pstpad)->activate_push) |
| Get pad activate push function. | |
| #define | PAD_EVENTFUNC(pstpad) ((pstpad)->event_handler) |
| Get pad event handler. | |
| #define | PAD_QUERYFUNC(pstpad) ((pstpad)->query_handler) |
| Get pad query handler. | |
| #define | PAD_PULLFUNC(pstpad) ((pstpad)->pull_handler) |
| Get pad pull handler. | |
| #define | PAD_CHAINFUNC(pstpad) ((pstpad)->chain_handler) |
| Get pad chain handler. | |
Typedefs | |
| typedef uint8_t(* | PadActivateFunc) (struct _StreamPad *pad, uint8_t active) |
| typedef FlowReturn(* | PadPullFunc) (struct _StreamPad *pad, StreamBuffer *buffer, uint32_t size, uint32_t offset) |
| typedef FlowReturn(* | PadChainFunc) (struct _StreamPad *pad, StreamBuffer *buffer) |
| typedef uint8_t(* | PadEventFunc) (struct _StreamPad *pad, StreamEvent *event) |
| typedef uint8_t(* | PadQueryFunc) (struct _StreamPad *pad, StreamQuery *query) |
| typedef int32_t(* | PadProcessFunc) (struct _StreamPad *pad) |
| typedef uint8_t(* | PadPrecheckFunc) (struct _StreamPad *pad) |
Enumerations | |
| enum | EventTypeFlags { EVENT_TYPE_UPSTREAM = 1 << 0 , EVENT_TYPE_DOWNSTREAM = 1 << 1 , EVENT_TYPE_SERIALIZED = 1 << 2 } |
| enum | EventType { EVENT_UNKNOWN = EVENT_MAKE_TYPE(0, 0) , EVENT_FLUSH_START = EVENT_MAKE_TYPE(1, FLAG(BOTH)) , EVENT_FLUSH_STOP = EVENT_MAKE_TYPE(2, FLAG(BOTH) | FLAG(SERIALIZED)) , EVENT_EOS = EVENT_MAKE_TYPE(3, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)) , EVENT_NEWSEGMENT = EVENT_MAKE_TYPE(4, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)) , EVENT_SEEK = EVENT_MAKE_TYPE(5, FLAG(UPSTREAM)) } |
| enum | PadScheduling { SCHEDULING_NONE , SCHEDULING_PULL , SCHEDULING_PUSH } |
| enum | PadType { TYPE_PAD_SRC , TYPE_PAD_SINK , TYPE_PAD_LAST } |
| enum | FlowReturn { FLOW_OK = 0 , FLOW_NOT_LINKED = -1 , FLOW_WRONG_STATE = -2 , FLOW_UNEXPECTED = -3 , FLOW_ERROR = -4 , FLOW_NOT_SUPPORTED = -5 , FLOW_BAD_PARAMETER = -6 , FLOW_TIME_OUT = -7 , FLOW_EOS = -8 } |
Functions | |
| FlowReturn | init_pad (StreamPad *pad, void *parent, PadType type) |
| Pad initialization function. More... | |
| FlowReturn | deinit_pad (StreamPad *pad) |
| Pad deinitialization function. More... | |
| FlowReturn | pad_push (StreamPad *pad, StreamBuffer *buffer) |
| Push the data buffer to the peer pad. More... | |
| FlowReturn | pad_pull_range (StreamPad *pad, uint32_t offset, uint32_t size, StreamBuffer *buffer) |
| Pull the data buffer from the peer pad. More... | |
| uint8_t | pad_push_event (StreamPad *pad, StreamEvent *event) |
| Push event to the peer pad. More... | |
| uint8_t | pad_send_event (StreamPad *pad, StreamEvent *event) |
| Send the event to the element where it will be handled by a handler function. More... | |
| uint8_t | activate_pad (StreamPad *pad, uint8_t activate) |
| Call the appropriate pad activation function. More... | |
| uint8_t | pad_activate_pull (StreamPad *pad, uint8_t active) |
| Pad activation/deactivation in pull mode. More... | |
| uint8_t | pad_activate_push (StreamPad *pad, uint8_t active) |
| Pad activation/deactivation in push mode. More... | |
| FlowReturn | event_create_flush_start (StreamEvent *event) |
| Create flush start event. More... | |
| FlowReturn | event_create_flush_stop (StreamEvent *event) |
| Create flush stop event. More... | |
| FlowReturn | event_create_eos (StreamEvent *event) |
| Create end of stream event. More... | |
| FlowReturn | event_create_new_segment (StreamEvent *event, StreamDataFormat format, uint32_t data) |
| Create new segment event. More... | |
| FlowReturn | event_create_seek (StreamEvent *event, StreamDataFormat format, uint32_t data) |
| Create seek event. More... | |
| uint8_t | pad_query (StreamPad *pad, StreamQuery *query) |
| Send a query to a pad. More... | |
| FlowReturn | query_create (StreamQuery *query, StreamInfoType type, StreamDataFormat format, StreamDataType data_type, StreamData *data) |
| Create a query for element or pipeline. More... | |
| #define EVENT_MAKE_TYPE | ( | num, | |
| flags | |||
| ) | (((num) << EVENT_TYPE_SHIFT) | (flags)) |
EVENT_MAKE_TYPE:
| num | the event number to create |
| flags | the event flags |
when making custom event types, use this macro with the num and the given flags
| #define EVENT_IS_UPSTREAM | ( | ev | ) | ((uint32_t)EVENT_TYPE(ev) & (uint32_t)EVENT_TYPE_UPSTREAM) |
EVENT_IS_UPSTREAM
| ev | the event to query |
Check if an event can travel upstream.
| #define EVENT_IS_DOWNSTREAM | ( | ev | ) | ((uint32_t)EVENT_TYPE(ev) & (uint32_t)EVENT_TYPE_DOWNSTREAM) |
EVENT_IS_DOWNSTREAM
| ev | the event to query |
Check if an event can travel downstream.
| #define EVENT_IS_SERIALIZED | ( | ev | ) | ((uint32_t)EVENT_TYPE(ev) & (uint32_t)EVENT_TYPE_SERIALIZED) |
EVENT_IS_SERIALIZED
| ev | the event to query |
Check if an event is serialized with the data stream.
| #define MEMBERS_PAD |
| typedef uint8_t(* PadActivateFunc) (struct _StreamPad *pad, uint8_t active) |
Pad Activation Function Handler
| typedef FlowReturn(* PadPullFunc) (struct _StreamPad *pad, StreamBuffer *buffer, uint32_t size, uint32_t offset) |
Pad Pull Function Handler
| typedef FlowReturn(* PadChainFunc) (struct _StreamPad *pad, StreamBuffer *buffer) |
Pad Chain Function Handler
| typedef uint8_t(* PadEventFunc) (struct _StreamPad *pad, StreamEvent *event) |
Pad Event Function Handler
| typedef uint8_t(* PadQueryFunc) (struct _StreamPad *pad, StreamQuery *query) |
Pad Query Function Handler
| typedef int32_t(* PadProcessFunc) (struct _StreamPad *pad) |
Pad Process Function Handler
| typedef uint8_t(* PadPrecheckFunc) (struct _StreamPad *pad) |
Pad Process Pre-check Function Handler
| enum EventTypeFlags |
| enum EventType |
EventType EventType lists the standard event types that can be sent in a pipeline.
| enum PadScheduling |
PadScheduling The status of a Pad. After activating a pad, which usually happens when the parent element goes from READY to PAUSED, the ActivateMode defines if the pad operates in push or pull mode.
| Enumerator | |
|---|---|
| SCHEDULING_NONE | Pad will not handle dataflow. |
| SCHEDULING_PULL | Pad handles dataflow in upstream pull mode. |
| SCHEDULING_PUSH | Pad handles dataflow in downstream push mode. |
| enum PadType |
| enum FlowReturn |
FlowReturn The result of passing data to a pad. Note that the custom return values should not be exposed outside of the element scope and are available since 0.10.7.
| FlowReturn init_pad | ( | StreamPad * | pad, |
| void * | parent, | ||
| PadType | type | ||
| ) |
| pad | pad object |
| parent | parent element object |
| type | pad type |
| FlowReturn deinit_pad | ( | StreamPad * | pad | ) |
| pad | pad object |
| FlowReturn pad_push | ( | StreamPad * | pad, |
| StreamBuffer * | buffer | ||
| ) |
| pad | pad object |
| buffer | data buffer |
| FlowReturn pad_pull_range | ( | StreamPad * | pad, |
| uint32_t | offset, | ||
| uint32_t | size, | ||
| StreamBuffer * | buffer | ||
| ) |
| pad | pad object |
| offset | offset position to be read from |
| size | size to be read |
| buffer | data buffer to be filled |
| uint8_t pad_push_event | ( | StreamPad * | pad, |
| StreamEvent * | event | ||
| ) |
| pad | pad object |
| event | event object |
| uint8_t pad_send_event | ( | StreamPad * | pad, |
| StreamEvent * | event | ||
| ) |
| pad | pad object |
| event | event object |
| uint8_t activate_pad | ( | StreamPad * | pad, |
| uint8_t | activate | ||
| ) |
| pad | pad object |
| activate | activation/deactivation flag |
| uint8_t pad_activate_pull | ( | StreamPad * | pad, |
| uint8_t | active | ||
| ) |
| pad | pad object |
| active | activation/deactivation flag |
| uint8_t pad_activate_push | ( | StreamPad * | pad, |
| uint8_t | active | ||
| ) |
| pad | pad object |
| active | activation/deactivation flag |
| FlowReturn event_create_flush_start | ( | StreamEvent * | event | ) |
| event | event object |
| FlowReturn event_create_flush_stop | ( | StreamEvent * | event | ) |
| event | event object |
| FlowReturn event_create_eos | ( | StreamEvent * | event | ) |
| event | event object |
| FlowReturn event_create_new_segment | ( | StreamEvent * | event, |
| StreamDataFormat | format, | ||
| uint32_t | data | ||
| ) |
| event | event object |
| format | data format |
| data | data object |
| FlowReturn event_create_seek | ( | StreamEvent * | event, |
| StreamDataFormat | format, | ||
| uint32_t | data | ||
| ) |
| event | event object |
| format | data format |
| data | data object |
| uint8_t pad_query | ( | StreamPad * | pad, |
| StreamQuery * | query | ||
| ) |
| pad | pad object |
| query | query object |
| FlowReturn query_create | ( | StreamQuery * | query, |
| StreamInfoType | type, | ||
| StreamDataFormat | format, | ||
| StreamDataType | data_type, | ||
| StreamData * | data | ||
| ) |
| query | query object to be created |
| type | type of information to be queried |
| format | data format |
| data_type | data type |
| data | data object |