Maestro Audio Framework v 1.7
NXP Semiconductors
Loading...
Searching...
No Matches
file_src_freertos.h File Reference

This is the header file for the file source element. More...

#include "audio_cfg.h"
#include "streamer_element.h"
#include "file_utils.h"

Data Structures

struct  ElementFileSrc
 
struct  StreamerFileSrcConfig
 

Macros

#define FILESRC_DEFAULT_CHUNK_SIZE   1024
 

Functions

int32_t filesrc_init (StreamElement *element)
 this function initializes the file source element and source pad. All the pad's handlers are intialized.
 
int32_t filesrc_set_location (ElementHandle element, char *path)
 Set a destination file to be read by file source element.
 
int32_t filesrc_get_location (ElementHandle element, char **pp_path)
 This function gets the location of the file.
 
int32_t filesrc_set_push_chunk_size (ElementHandle element, uint32_t chunk_size)
 Set the chunk size in which the file source sends the data in push mode.
 
int32_t filesrc_get_push_chunk_size (ElementHandle element, uint64_t *chunk_size)
 Get the chunk size in which the file source sends the data in push mode.
 
int32_t file_src_get_decoder_type (char *filename, StreamerFileSrcConfig *config)
 Get the file source decoder and parser type.
 

Macro Definition Documentation

◆ FILESRC_DEFAULT_CHUNK_SIZE

#define FILESRC_DEFAULT_CHUNK_SIZE   1024

Default file read size

Function Documentation

◆ filesrc_init()

int32_t filesrc_init ( StreamElement * element)
Parameters
elementpointer to element
Returns
StreamReturnType
Return values
STREAM_OKif successful
STREAM_ERR_INVALID_ARGSmeans invalid arguments

◆ filesrc_set_location()

int32_t filesrc_set_location ( ElementHandle element,
char * path )
Parameters
elementelement handle
pathpointer to a file path
Returns
StreamReturnType
Return values
STREAM_OKif successful
STREAM_ERR_INVALID_ARGSmeans invalid arguments

◆ filesrc_get_location()

int32_t filesrc_get_location ( ElementHandle element,
char ** pp_path )
Parameters
elementelement handle
pp_pathlocation path
Returns
StreamReturnType
Return values
STREAM_OKif successful
STREAM_ERR_INVALID_ARGSmeans invalid arguments

◆ filesrc_set_push_chunk_size()

int32_t filesrc_set_push_chunk_size ( ElementHandle element,
uint32_t chunk_size )
Parameters
elementelement handle
chunk_sizechunk size
Returns
StreamReturnType
Return values
STREAM_OKif successful
STREAM_ERR_INVALID_ARGSmeans invalid arguments

◆ filesrc_get_push_chunk_size()

int32_t filesrc_get_push_chunk_size ( ElementHandle element,
uint64_t * chunk_size )
Parameters
elementelement handle
chunk_sizechunk size
Returns
StreamReturnType
Return values
STREAM_OKif successful
STREAM_ERR_INVALID_ARGSmeans invalid arguments

◆ file_src_get_decoder_type()

int32_t file_src_get_decoder_type ( char * filename,
StreamerFileSrcConfig * config )
Parameters
filenamename of the file
configfile source information
Returns
StreamReturnType
Return values
STREAM_OKif successful
STREAM_ERR_GENERALmeans either file does not contain an extension or the file type is not supported