Maestro Audio Framework v 1.5
NXP Semiconductors
streamer_fs.c File Reference

Implementation of streamer file system support. More...

#include <string.h>
#include "audio_cfg.h"
#include "pipeline.h"
#include "streamer_fs.h"
#include "streamer_element_properties.h"
#include "audio_proc.h"

Functions

int streamer_build_fs_pipeline (int8_t pipeline_index, const char *out_dev_name, StreamPipelineType pipeline_type, STREAMER_T *task_data)
 Build the file source pipeline. More...
 
int streamer_destroy_fs_pipeline (int8_t pipeline_index, STREAMER_T *task_data)
 Destroy file system pipeline. More...
 
int streamer_get_fs_pipeline_config (char *filename, StreamerFileSrcConfig *config)
 Get file type from the file name and extension. More...
 

Variables

static StreamerFileSrcConfig file_src_cfg_lookup_table []
 

Function Documentation

◆ streamer_build_fs_pipeline()

int streamer_build_fs_pipeline ( int8_t  pipeline_index,
const char *  out_dev_name,
StreamPipelineType  pipeline_type,
STREAMER_T task_data 
)
Parameters
pipeline_indexPipeline index
out_dev_nameOut device name
pipeline_typePipeline type
task_dataPointer to streamer object
Returns
int

◆ streamer_destroy_fs_pipeline()

int streamer_destroy_fs_pipeline ( int8_t  pipeline_index,
STREAMER_T task_data 
)
Parameters
pipeline_indexPipeline index
task_dataPointer to streamer object
Returns
int

◆ streamer_get_fs_pipeline_config()

int streamer_get_fs_pipeline_config ( char *  filename,
StreamerFileSrcConfig config 
)

Assign corresponding decoder type according to the file extension

Parameters
[in]filenameInput file name
[out]configOutput config structure
Returns
int

Variable Documentation

◆ file_src_cfg_lookup_table

StreamerFileSrcConfig file_src_cfg_lookup_table[]
static
Initial value:
= {
@ LAST_DECODER_TYPE
Placeholder.
Definition: streamer_api.h:317
@ LAST_PARSER_TYPE
Placeholder.
Definition: streamer_api.h:334

This table is used by Filesystem pipeline to select the appropriate decoder and parser based on the extension of the file. This is needed to properly configure the pipeline when switching between different audio file types.