Maestro Audio Framework v 1.7
NXP Semiconductors
|
Af Streamer implementation. More...
Functions | |
void | streamer_task (void *args) |
Streamer Task. | |
void | streamer_init (STREAMER_T *streamer) |
Streamer Initialize. | |
int | streamer_msg_handler (STREAMER_T *task_data, STREAMER_MSG_T *msg) |
Streamer Message Handler. | |
int | streamer_process_pipelines (STREAMER_T *task_data) |
Streamer Process Pipelines. | |
static int32_t | streamer_handle_msg (STREAMER_T *streamer, STREAMER_MSG_T *msg, bool block) |
Streamer handle message. | |
int32_t | streamer_create_pipeline (STREAMER_T *streamer, int32_t pipeline_id, const char *in_dev_name, const char *out_dev_name, PipelineElements elements, bool block) |
Create a pipeline that will handle the different connected elements. | |
int32_t | streamer_destroy_pipeline (STREAMER_T *streamer, int32_t pipeline_id, bool block) |
Destroy a pipeline. | |
int32_t | streamer_get_track_info (STREAMER_T *streamer, int32_t pipeline_id, TrackInfo *info, bool block) |
Get track information. | |
int32_t | streamer_set_state (STREAMER_T *streamer, int32_t pipeline_id, PipelineState state, bool block) |
Set streamer state. | |
int32_t | streamer_get_state (STREAMER_T *streamer, int32_t pipeline_id, PipelineState *state, bool block) |
Get streamer state. | |
int32_t | streamer_query_info (STREAMER_T *streamer, int32_t pipeline_id, StreamInfoType infoType, StreamData *query_data, bool block) |
Query streamer information. | |
int32_t | streamer_seek_pipeline (STREAMER_T *streamer, int32_t pipeline_id, int32_t seek_time_ms, bool block) |
Seek pipeline. | |
int32_t | streamer_set_property (STREAMER_T *streamer, int8_t pipeline_id, ELEMENT_PROPERTY_T prop, bool block) |
Set element property. | |
int32_t | streamer_get_property (STREAMER_T *streamer, int8_t pipeline_id, uint16_t prop, uint32_t *val_ptr, bool block) |
Get element property. | |
int32_t | streamer_set_file (STREAMER_T *streamer, int32_t pipeline_id, char *path, PipelineState state, bool block) |
Set file source. | |
int32_t | streamer_set_repeat (STREAMER_T *streamer, int32_t pipeline_id, bool repeat_on, bool block) |
Set pipeline to repeat. | |
Variables | |
char | g_cci_meta_location [MAX_LOCATION_PATH_LENGTH] |
#define | MAX_MSG_RECV_PER_CYCLE (5) |
Maximum messages received per streamer task cycle. | |
static ElementTypeLookup | type_lookup_table [] |
Element type lookup table for getting element type from element index. | |
const STREAMER_MSG_HANDLER_T | msg_handler_table [] |
OSA_TASK_HANDLE_DEFINE (thread_hdl) | |
Osa task handle object. | |
static int32_t | streamer_deinit (STREAMER_T *streamer) |
Streamer deinit. | |
STREAMER_T * | streamer_create (STREAMER_CREATE_PARAM *task_param) |
Create a streamer. | |
int32_t | streamer_destroy (STREAMER_T *streamer) |
Destroy a streamer object. | |
|
static |
Deinit all data associated with Streamer Task
[in] | streamer | Pointer to streamer task data structure |
STREAMER_T * streamer_create | ( | STREAMER_CREATE_PARAM * | task_param | ) |
Function for creating of a streamer object serving as the core of the framework. A streamer task is created that is responsible for handling the messages between the framework and the application. Then a pipeline for audio processing is created using streamer_create_pipeline.
task_param | paremeters for creating the core streamer task |
int32_t streamer_destroy | ( | STREAMER_T * | streamer | ) |
streamer | The streamer object to be destroyed |
void streamer_task | ( | void * | arg | ) |
This is the streamer task function that processes the main streamer loop. The loop will look to receive messages from the application and to initiate the processing of data through active pipelines.
[in] | arg | Pointer to input argument structure (STREAMER_ARGS_T) |
void streamer_init | ( | STREAMER_T * | streamer | ) |
Initialize data structure associated with Streamer Task
[in] | streamer | Pointer to streamer task data structure |
int streamer_msg_handler | ( | STREAMER_T * | streamer, |
STREAMER_MSG_T * | msg ) |
Processes a single message that was received in the streamer task message queue. Messages should follow the format defined in STREAMER_MSG_T structure.
[in] | streamer | Pointer to streamer task data structure |
[in] | msg | Pointer to message data. |
ERRCODE_NO_ERROR | Message was successfully processed |
ERRCODE_INVALID_ARGUMENT | Invalid Message |
int streamer_process_pipelines | ( | STREAMER_T * | streamer | ) |
Loops through the pipelines present in the streamer task and if the pipeline is in Playing state calls the process pipeline function to start the flow of data.
[in] | streamer | Pointer to streamer task data structure |
ERRCODE_NO_ERROR | Message was successfully processed |
ERRCODE_INVALID_ARGUMENT | Invalid Message |
|
static |
streamer | Pointer to a streamer object |
msg | Streamer message |
block | Blocking/non-blocking |
int32_t streamer_create_pipeline | ( | STREAMER_T * | streamer, |
int32_t | pipeline_id, | ||
const char * | in_dev_name, | ||
const char * | out_dev_name, | ||
PipelineElements | elements, | ||
bool | block ) |
streamer | streamer object |
pipeline_id | unique pipeline ID |
in_dev_name | input device name |
out_dev_name | output device name |
block | blocking / non-blocking creation of pipeline called directly |
int32_t streamer_destroy_pipeline | ( | STREAMER_T * | streamer, |
int32_t | pipeline_id, | ||
bool | block ) |
streamer | streamer object |
pipeline_id | unique pipeline ID |
block | blocking / non-blocking destruction of pipeline |
int32_t streamer_get_track_info | ( | STREAMER_T * | streamer, |
int32_t | pipeline_id, | ||
TrackInfo * | info, | ||
bool | block ) |
streamer | streamer object |
pipeline_id | unique pipeline ID |
info | track information |
block | blocking / non-blocking mode |
int32_t streamer_set_state | ( | STREAMER_T * | streamer, |
int32_t | pipeline_id, | ||
PipelineState | state, | ||
bool | block ) |
streamer | streamer object |
pipeline_id | unique pipeline ID |
state | streamer state |
block | blocking / non-blocking mode |
int32_t streamer_get_state | ( | STREAMER_T * | streamer, |
int32_t | pipeline_id, | ||
PipelineState * | state, | ||
bool | block ) |
streamer | streamer object |
pipeline_id | unique pipeline ID |
state | streamer state |
block | blocking / non-blocking mode |
int32_t streamer_query_info | ( | STREAMER_T * | streamer, |
int32_t | pipeline_id, | ||
StreamInfoType | infoType, | ||
StreamData * | query_data, | ||
bool | block ) |
streamer | streamer object |
pipeline_id | unique pipeline ID |
infoType | streamer information type |
query_data | query data |
block | blocking / non-blocking mode |
int32_t streamer_seek_pipeline | ( | STREAMER_T * | streamer, |
int32_t | pipeline_id, | ||
int32_t | seek_time_ms, | ||
bool | block ) |
streamer | streamer object |
pipeline_id | unique pipeline ID |
seek_time_ms | desired seek time in [ms] |
block | blocking / non-blocking mode |
int32_t streamer_set_property | ( | STREAMER_T * | streamer, |
int8_t | pipeline_id, | ||
ELEMENT_PROPERTY_T | prop, | ||
bool | block ) |
streamer | streamer object |
pipeline_id | pipeline index |
prop | element property |
block | blocking / non-blocking mode |
int32_t streamer_get_property | ( | STREAMER_T * | streamer, |
int8_t | pipeline_id, | ||
uint16_t | prop, | ||
uint32_t * | val_ptr, | ||
bool | block ) |
streamer | streamer object |
pipeline_id | pipeline index |
prop | element property |
val_ptr | property value |
block | blocking / non-blocking mode |
int32_t streamer_set_file | ( | STREAMER_T * | streamer, |
int32_t | pipeline_id, | ||
char * | path, | ||
PipelineState | state, | ||
bool | block ) |
streamer | streamer object |
pipeline_id | unique pipeline ID |
path | path to the file |
state | streamer state |
block | blocking / non-blocking mode |
int32_t streamer_set_repeat | ( | STREAMER_T * | streamer, |
int32_t | pipeline_id, | ||
bool | repeat_on, | ||
bool | block ) |
streamer | streamer object |
pipeline_id | unique pipeline ID |
repeat_on | repeat flag |
block | blocking / non-blocking mode |
|
static |
const STREAMER_MSG_HANDLER_T msg_handler_table[] |
Streamer Message Handler Table Specifies the function to handle incoming message requests within the streamer task.
char g_cci_meta_location[MAX_LOCATION_PATH_LENGTH] |
TEMP - remove when CCI metadata is fixed