Maestro Audio Framework v 1.5
NXP Semiconductors
vit_sink.h File Reference

This file includes defines, enums and typedefs for vit sink. More...

#include "streamer_element.h"

Data Structures

struct  ElementVitSink
 VIT sink element's data structure. More...
 

Macros

#define AUDIO_CHUNK_SIZE(pstaudio_packet)   ((pstaudio_packet)->chunk_size)
 Get audio packet chunk size.
 

Typedefs

typedef int(* VitSinkInitFunc) (void *)
 audio sink initialize function proto type
 
typedef int(* VitSinkPostProcFunc) (void *, void *, int)
 audio sink post process function proto type
 
typedef int(* VitSinkDeinitFunc) (void)
 audio sink deinitialize function proto type
 

Functions

int32_t vitsink_set_buffer (ElementHandle element_hdl, char *location_ptr, uint32_t size)
 Set the location of the memory buffer to write to as well as the size. More...
 
int32_t vitsink_set_raw_write_mode (ElementHandle element_hdl, uint8_t raw_write_mode)
 This function sets the raw write mode or the packet header mode to write to memory. (write_mode == true) means only data will be written (no packet headers) (write_mode == false) means packet header will be written aOSA_LONG with data. More...
 
int32_t vitsink_init_element (StreamElement *element_ptr)
 This function initializes the vit sink element and sink pads. More...
 
int32_t vit_register_ext_processing (ElementHandle element, VitSinkInitFunc init_func_ptr, VitSinkPostProcFunc proc_func_ptr, VitSinkDeinitFunc deinit_func_ptr, void *arg_ptr)
 Register external processing function and argument pointers. More...
 

Function Documentation

◆ vitsink_set_buffer()

int32_t vitsink_set_buffer ( ElementHandle  element_hdl,
char *  location_ptr,
uint32_t  size 
)
Parameters
element_hdlelement handle
location_ptrlocation path
sizememory buffer size
Returns
StreamReturnType
Return values
STREAM_OKsuccess
STREAM_ERR_INVALID_ARGSinvalid parameters
STREAM_ERR_GENERALstatus is bigger than or equal to STATE_PAUSED

◆ vitsink_set_raw_write_mode()

int32_t vitsink_set_raw_write_mode ( ElementHandle  element_hdl,
uint8_t  raw_write_mode 
)
Parameters
element_hdlelement handle
raw_write_modewrite mode raw (or) packet header
Returns
StreamReturnType
Return values
STREAM_OKsuccess
STREAM_ERR_INVALID_ARGSinvalid arguments
STREAM_ERR_GENERALvalue is bigger than or equal to STATE_PAUSED

◆ vitsink_init_element()

int32_t vitsink_init_element ( StreamElement *  element_ptr)
Parameters
element_ptrpointer of memory sink element instance
Returns
StreamReturnType
Return values
STREAM_OKsuccess
STREAM_ERR_ELEMENT_NOT_FOUNDinvalid instance pointer of element_ptr

◆ vit_register_ext_processing()

int32_t vit_register_ext_processing ( ElementHandle  element,
VitSinkInitFunc  init_func_ptr,
VitSinkPostProcFunc  proc_func_ptr,
VitSinkDeinitFunc  deinit_func_ptr,
void *  arg_ptr 
)
Parameters
elementVIT element handle
init_func_ptrInit function pointer
proc_func_ptrProcess function pointer
deinit_func_ptrDeinit function pointer
arg_ptrArguments pointer
Returns
STREAM_OK
STREAM_ERR_INVALID_ARGS