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

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

#include "streamer_element.h"

Data Structures

struct  ElementMemSink
 Memory sink element's data structure. More...
 

Functions

int32_t memsink_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.
 
int32_t memsink_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.
 
int32_t memsink_init_element (StreamElement *element_ptr)
 This function initializes the memory sink element and sink pads.
 

Function Documentation

◆ memsink_set_buffer()

int32_t memsink_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 eque to STATE_PAUSED

◆ memsink_set_raw_write_mode()

int32_t memsink_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 eque to STATE_PAUSED

◆ memsink_init_element()

int32_t memsink_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