Maestro Audio Framework v 1.5
NXP Semiconductors
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
 

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. More...
 
int32_t filesrc_set_location (ElementHandle element, char *path)
 Set a destination file to be read by file source element. More...
 
int32_t filesrc_get_location (ElementHandle element, char **pp_path)
 This function gets the location of the file. More...
 
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. More...
 
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. More...
 

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