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

Common encoder interface API prototypes. More...

#include <stdint.h>
#include <stdio.h>

Data Structures

struct  BufferInfo
 Holds buffer information,. More...
 
struct  CeiEncoderFunctions
 Common encoder interface function pointers. More...
 

Macros

#define CEI_ENCODER_ENCODEERR   -1
 Common encoder error.
 

Typedefs

typedef int(* CeiFnGetMemorySize) (uint8_t channels)
 Defines a function returning a memory size to be allocated.
 
typedef int(* CeiFnEncoderInit) (void *memory, uint32_t sampleRate, uint8_t channels)
 Defines a function initializing an encoder.
 
typedef int(* CeiFnEncoderGetConfig) (void *memory, void *config)
 Defines a function retrieving encoder configuration.
 
typedef int(* CeiFnEncoderSetConfig) (void *memory, void *config)
 Defines a function applying configuration to an encoder.
 
typedef int(* CeiFnEncode) (void *memory, BufferInfo *source, BufferInfo *dest)
 Defines a function which encodes data in a given input buffer to a given output buffer. Input buffer will contain 16-bit signed interleaved little-endian samples (s16le).
 

Typedef Documentation

◆ CeiFnGetMemorySize

typedef int(* CeiFnGetMemorySize) (uint8_t channels)
Parameters
channelsNumber of channels, which the encoder will encode.
Returns
The number of bytes to be allocated.

◆ CeiFnEncoderInit

typedef int(* CeiFnEncoderInit) (void *memory, uint32_t sampleRate, uint8_t channels)
Parameters
memoryPointer to memory previously allocated to hold encoder structures.
sampleRateThe source sample rate.
channelsNumber of channels which the encoder will encode.
Returns
0 if encoder was initialized successfully, anything other otherwise.

◆ CeiFnEncoderGetConfig

typedef int(* CeiFnEncoderGetConfig) (void *memory, void *config)
Parameters
memoryPointer to previously allocated memory with encoder structures. Can be NULL if default configuration is desired.
configPointer to an encoder-specific configuration structure.
Returns
0 if configuration gathered successfully, anything other otherwise.

◆ CeiFnEncoderSetConfig

typedef int(* CeiFnEncoderSetConfig) (void *memory, void *config)
Parameters
memoryPointer to previously allocated memory with encoder structures.
configPointer to an encoder-specific configuration structure.
Returns
0 if configuration applied successfully, anything other otherwise.

◆ CeiFnEncode

typedef int(* CeiFnEncode) (void *memory, BufferInfo *source, BufferInfo *dest)
Parameters
memoryPointer to previously allocated memory with encoder structures.
sourceContains information about the input buffer.
destContains information about the output buffer.
Returns
Number of produced bytes or CEI_ENCODER_ENCODEERR. 0 constitutes an EOS condition.