MediaProcessors
Classes | Typedefs | Functions
audio_settings.h File Reference

Audio encoder and decoder generic settings. More...

#include <libmediaprocsutils/mem_utils.h>
Include dependency graph for audio_settings.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  audio_settings_enc_ctx_s
 
struct  audio_settings_dec_ctx_s
 

Typedefs

typedef struct log_ctx_s log_ctx_t
 
typedef struct cJSON cJSON
 
typedef struct audio_settings_enc_ctx_s audio_settings_enc_ctx_t
 
typedef struct audio_settings_dec_ctx_s audio_settings_dec_ctx_t
 

Functions

audio_settings_enc_ctx_taudio_settings_enc_ctx_allocate ()
 
void audio_settings_enc_ctx_release (audio_settings_enc_ctx_t **ref_audio_settings_enc_ctx)
 
int audio_settings_enc_ctx_init (volatile audio_settings_enc_ctx_t *audio_settings_enc_ctx)
 
void audio_settings_enc_ctx_deinit (volatile audio_settings_enc_ctx_t *audio_settings_enc_ctx)
 
int audio_settings_enc_ctx_cpy (const audio_settings_enc_ctx_t *audio_settings_enc_ctx_src, audio_settings_enc_ctx_t *audio_settings_enc_ctx_dst)
 
int audio_settings_enc_ctx_restful_put (volatile audio_settings_enc_ctx_t *audio_settings_enc_ctx, const char *str, log_ctx_t *log_ctx)
 
int audio_settings_enc_ctx_restful_get (volatile audio_settings_enc_ctx_t *audio_settings_enc_ctx, cJSON **ref_cjson_rest, log_ctx_t *log_ctx)
 
audio_settings_dec_ctx_taudio_settings_dec_ctx_allocate ()
 
void audio_settings_dec_ctx_release (audio_settings_dec_ctx_t **ref_audio_settings_dec_ctx)
 
int audio_settings_dec_ctx_init (volatile audio_settings_dec_ctx_t *audio_settings_dec_ctx)
 
void audio_settings_dec_ctx_deinit (volatile audio_settings_dec_ctx_t *audio_settings_dec_ctx)
 
int audio_settings_dec_ctx_cpy (const audio_settings_dec_ctx_t *audio_settings_dec_ctx_src, audio_settings_dec_ctx_t *audio_settings_dec_ctx_dst)
 
int audio_settings_dec_ctx_restful_put (volatile audio_settings_dec_ctx_t *audio_settings_dec_ctx, const char *str, log_ctx_t *log_ctx)
 
int audio_settings_dec_ctx_restful_get (volatile audio_settings_dec_ctx_t *audio_settings_dec_ctx, cJSON **ref_cjson_rest, log_ctx_t *log_ctx)
 

Detailed Description

Audio encoder and decoder generic settings.

Author
Rafael Antoniello

Definition in file audio_settings.h.

Typedef Documentation

Generic audio decoder settings context structure. This structure may be extended by any specific implementation of a audio decoder.

Generic audio encoder settings context structure. This structure may be extended by any specific implementation of an audio encoder.

Function Documentation

audio_settings_dec_ctx_t* audio_settings_dec_ctx_allocate ( )

Allocate generic audio decoder settings context structure.

Returns
Pointer to the generic audio decoder settings context structure.

Definition at line 218 of file audio_settings.c.

int audio_settings_dec_ctx_cpy ( const audio_settings_dec_ctx_t audio_settings_dec_ctx_src,
audio_settings_dec_ctx_t audio_settings_dec_ctx_dst 
)

Copy audio decoder generic settings members, duplicating any existent heap allocation.

Parameters
audio_settings_dec_ctx_srcPointer to the generic audio decoder settings context structure to be copied (namely, the source structure).
audio_settings_dec_ctx_dstPointer to the generic audio decoder settings context structure that holds the copy (namely, the destination structure).
Returns
Status code (STAT_SUCCESS code in case of success, for other code values please refer to .stat_codes.h).

Definition at line 275 of file audio_settings.c.

void audio_settings_dec_ctx_deinit ( volatile audio_settings_dec_ctx_t audio_settings_dec_ctx)

De-initialize audio decoder generic settings. This function release any heap-allocated field or structure member.

Parameters
audio_settings_dec_ctxPointer to the generic audio decoder settings context structure to be de-initialized.

Definition at line 256 of file audio_settings.c.

int audio_settings_dec_ctx_init ( volatile audio_settings_dec_ctx_t audio_settings_dec_ctx)

Initialize audio decoder generic settings to defaults.

Parameters
audio_settings_dec_ctxPointer to the generic audio decoder settings context structure to be initialized.
Returns
Status code (STAT_SUCCESS code in case of success, for other code values please refer to .stat_codes.h).

Definition at line 242 of file audio_settings.c.

void audio_settings_dec_ctx_release ( audio_settings_dec_ctx_t **  ref_audio_settings_dec_ctx)

Release generic audio decoder settings context structure previously allocated by 'audio_settings_dec_ctx_allocate()'.

Parameters
ref_audio_settings_dec_ctx

Definition at line 224 of file audio_settings.c.

int audio_settings_dec_ctx_restful_get ( volatile audio_settings_dec_ctx_t audio_settings_dec_ctx,
cJSON **  ref_cjson_rest,
log_ctx_t log_ctx 
)

Translate and get the audio decoder generic settings in a cJSON structure.

Parameters
audio_settings_dec_ctxPointer to the generic audio decoder settings context structure to be translated.
ref_cjson_restReference to a pointer to a cJSON structure in which the translated settings are returned (by argument).
log_ctxExternally defined LOG module context structure.
Returns
Status code (STAT_SUCCESS code in case of success, for other code values please refer to .stat_codes.h).

Definition at line 399 of file audio_settings.c.

int audio_settings_dec_ctx_restful_put ( volatile audio_settings_dec_ctx_t audio_settings_dec_ctx,
const char *  str,
log_ctx_t log_ctx 
)

Put new settings passed by argument in query-string or JSON format.

Parameters
audio_settings_dec_ctxPointer to the generic audio decoder settings context structure to be modified.
strNew parameters passed in query-string or JSON format.
log_ctxExternally defined LOG module context structure.
Returns
Status code (STAT_SUCCESS code in case of success, for other code values please refer to .stat_codes.h).

Definition at line 298 of file audio_settings.c.

audio_settings_enc_ctx_t* audio_settings_enc_ctx_allocate ( )

Allocate generic audio encoder settings context structure.

Returns
Pointer to the generic audio encoder settings context structure.

Definition at line 48 of file audio_settings.c.

int audio_settings_enc_ctx_cpy ( const audio_settings_enc_ctx_t audio_settings_enc_ctx_src,
audio_settings_enc_ctx_t audio_settings_enc_ctx_dst 
)

Copy audio encoder generic settings members, duplicating any existent heap allocation.

Parameters
audio_settings_enc_ctx_srcPointer to the generic audio encoder settings context structure to be copied (namely, the source structure).
audio_settings_enc_ctx_dstPointer to the generic audio encoder settings context structure that holds the copy (namely, the destination structure).
Returns
Status code (STAT_SUCCESS code in case of success, for other code values please refer to .stat_codes.h).

Definition at line 90 of file audio_settings.c.

void audio_settings_enc_ctx_deinit ( volatile audio_settings_enc_ctx_t audio_settings_enc_ctx)

De-initialize audio encoder generic settings. This function release any heap-allocated field or structure member.

Parameters
audio_settings_enc_ctxPointer to the generic audio encoder settings context structure to be de-initialized.

Definition at line 83 of file audio_settings.c.

int audio_settings_enc_ctx_init ( volatile audio_settings_enc_ctx_t audio_settings_enc_ctx)

Initialize audio encoder generic settings to defaults.

Parameters
audio_settings_enc_ctxPointer to the generic audio encoder settings context structure to be initialized.
Returns
Status code (STAT_SUCCESS code in case of success, for other code values please refer to .stat_codes.h).

Definition at line 69 of file audio_settings.c.

void audio_settings_enc_ctx_release ( audio_settings_enc_ctx_t **  ref_audio_settings_enc_ctx)

Release generic audio encoder settings context structure previously allocated by 'audio_settings_enc_ctx_allocate()'.

Parameters
ref_audio_settings_enc_ctx

Definition at line 54 of file audio_settings.c.

int audio_settings_enc_ctx_restful_get ( volatile audio_settings_enc_ctx_t audio_settings_enc_ctx,
cJSON **  ref_cjson_rest,
log_ctx_t log_ctx 
)

Translate and get the audio encoder generic settings in a cJSON structure.

Parameters
audio_settings_enc_ctxPointer to the generic audio encoder settings context structure to be translated.
ref_cjson_restReference to a pointer to a cJSON structure in which the translated settings are returned (by argument).
log_ctxExternally defined LOG module context structure.
Returns
Status code (STAT_SUCCESS code in case of success, for other code values please refer to .stat_codes.h).

Definition at line 173 of file audio_settings.c.

int audio_settings_enc_ctx_restful_put ( volatile audio_settings_enc_ctx_t audio_settings_enc_ctx,
const char *  str,
log_ctx_t log_ctx 
)

Put new settings passed by argument in query-string or JSON format.

Parameters
audio_settings_enc_ctxPointer to the generic audio encoder settings context structure to be modified.
strNew parameters passed in query-string or JSON format.
log_ctxExternally defined LOG module context structure.
Returns
Status code (STAT_SUCCESS code in case of success, for other code values please refer to .stat_codes.h).

Definition at line 109 of file audio_settings.c.