Implementation of streamer element.
More...
|
uint8_t | activate_pads_element (StreamElement *element, uint8_t activate) |
| activate_pads_element
|
|
int32_t | send_msg_element (StreamElement *element, uint32_t message, uintptr_t data) |
| send_msg_element
|
|
int32_t | create_element (ElementHandle *handle, StreamElementType type, int8_t key) |
| create_element
|
|
int32_t | destroy_element (ElementHandle handle) |
| destroy_element
|
|
int32_t | get_element_info (ElementHandle handle, StreamElementType *ptype, int8_t *pkey) |
| get_element_info:
|
|
int32_t | link_elements (ElementHandle src_handle, int8_t src_pad_index, ElementHandle sink_handle, int8_t sink_pad_index) |
| link_elements
|
|
int32_t | unlink_elements (ElementHandle src_handle, int8_t src_pad_index, ElementHandle sink_handle, int8_t sink_pad_index) |
| unlink_elements
|
|
int32_t | element_get_property (ElementHandle element_hdl, uint16_t prop, uint64_t *val_ptr) |
| This function gets property value of element.
|
|
int32_t | element_set_property (ElementHandle element_hdl, uint16_t prop, uintptr_t val) |
| this function sets property value of element
|
|
◆ activate_pads_element()
uint8_t activate_pads_element |
( |
StreamElement * | element, |
|
|
uint8_t | activate ) |
This function iterates through all the pads of the elements, first src pads and then sink, and calls the activate pad function.
- Parameters
-
element | Pointer to element handle |
activate | Activate or Deactivate the pads? |
- Returns
- bool
◆ send_msg_element()
int32_t send_msg_element |
( |
StreamElement * | element, |
|
|
uint32_t | msg, |
|
|
uintptr_t | data ) |
The function creates and sends a message to the parent pipeline
- Parameters
-
element | Element from which the message is sent from |
msg | StreamMessage type |
data | Data associated with the message |
- Returns
- Error Status
- Return values
-
STREAM_OK | Message sent successfully |
STREAM_ERR_INVALID_ARGS | Invalid element/pipeline object |
◆ create_element()
Creates a new element of the required type. A byte key which should be unique within the same type of element.
- Parameters
-
handle | Pointer to element handle |
type | Element type |
key | Unique key within the same type of elements to retrieve the handle from the pipeline later. |
- Returns
- Error Status
- Return values
-
STREAM_OK | Element created successfully |
STREAM_ERR_NO_MEM | Error allocating memory |
STREAM_ERR_ELEMENT_NOT_FOUND | Element type not found |
◆ destroy_element()
Function to destroy element. Make sure that this element is not linked to any other element and not a part of pipeline.
- Parameters
-
- Returns
- Error Status
- Return values
-
STREAM_OK | Element successfully destroyed |
STREAM_ERR_ELEMENT_NOT_FREE | Element still associated with a pipeline |
STREAM_ERR_INVALID_ARGS | Invalid element object |
◆ get_element_info()
Function to return the element info.
- Parameters
-
handle | Element handle |
ptype | ElementType pointer to return the element type |
pkey | int8_t pointer to return the uinque element key |
- Returns
- Error Status
- Return values
-
STREAM_OK | Element info successfully retrieved |
STREAM_ERR_INVALID_ARGS | Invalid argument provided |
◆ link_elements()
Link elements from the source pad to sink pad.
- Parameters
-
src_handle | Element with the source pad. |
src_pad_index | Index of the source pad of element. |
sink_handle | Element with the sink pad. |
sink_pad_index | Index of the sink pad of element. |
- Returns
- Error Status
- Return values
-
STREAM_OK | Elements linked successfully |
STREAM_ERR_INVALID_ARGS | Invalid argument |
STREAM_ERR_ELEMENT_LINKED | Element already linked |
◆ unlink_elements()
Unlink elements from the source pad to sink pad.
- Parameters
-
src_handle | Element with the source pad. |
src_pad_index | Index of the source pad of element. |
sink_handle | Element with the sink pad. |
sink_pad_index | Index of the sink pad of element. |
- Returns
- Error Status
- Return values
-
STREAM_OK | Elements unlinked successfully |
STREAM_ERR_ELEMENT_PADS_NOT_LINKED | Elements not linked |
STREAM_ERR_INVALID_ARGS | Invalid arguments |
◆ element_get_property()
int32_t element_get_property |
( |
ElementHandle | element_hdl, |
|
|
uint16_t | prop, |
|
|
uint64_t * | val_ptr ) |
- Parameters
-
element_hdl | element handle |
prop | property id |
val_ptr | pointer to the address of value |
- Returns
- int32_t error codes
◆ element_set_property()
int32_t element_set_property |
( |
ElementHandle | element_hdl, |
|
|
uint16_t | prop, |
|
|
uintptr_t | val ) |
- Parameters
-
element_hdl | element handle |
prop | property id |
val | value to be set |
- Returns
- int32_t error codes
◆ element_list
Element List table This contains a list of all elements and their initialization functions. There should be an entry for each element of the 'StreamElementType' enum.