MediaProcessors
|
#include "audio_settings.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <libcjson/cJSON.h>
#include <libmediaprocsutils/uri_parser.h>
#include <libmediaprocsutils/log.h>
#include <libmediaprocsutils/stat_codes.h>
#include <libmediaprocsutils/check_utils.h>
#include <libmediaprocs/proc_if.h>
Go to the source code of this file.
Variables | |
static const char * | supported_samples_format_oput_array_dec [] |
Definition in file audio_settings.c.
audio_settings_dec_ctx_t* audio_settings_dec_ctx_allocate | ( | ) |
Allocate 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.
audio_settings_dec_ctx_src | Pointer to the generic audio decoder settings context structure to be copied (namely, the source structure). |
audio_settings_dec_ctx_dst | Pointer to the generic audio decoder settings context structure that holds the copy (namely, the destination structure). |
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.
audio_settings_dec_ctx | Pointer 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.
audio_settings_dec_ctx | Pointer to the generic audio decoder settings context structure to be initialized. |
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()'.
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.
audio_settings_dec_ctx | Pointer to the generic audio decoder settings context structure to be translated. |
ref_cjson_rest | Reference to a pointer to a cJSON structure in which the translated settings are returned (by argument). |
log_ctx | Externally defined LOG module context structure. |
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.
audio_settings_dec_ctx | Pointer to the generic audio decoder settings context structure to be modified. |
str | New parameters passed in query-string or JSON format. |
log_ctx | Externally defined LOG module context structure. |
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.
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.
audio_settings_enc_ctx_src | Pointer to the generic audio encoder settings context structure to be copied (namely, the source structure). |
audio_settings_enc_ctx_dst | Pointer to the generic audio encoder settings context structure that holds the copy (namely, the destination structure). |
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.
audio_settings_enc_ctx | Pointer 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.
audio_settings_enc_ctx | Pointer to the generic audio encoder settings context structure to be initialized. |
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()'.
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.
audio_settings_enc_ctx | Pointer to the generic audio encoder settings context structure to be translated. |
ref_cjson_rest | Reference to a pointer to a cJSON structure in which the translated settings are returned (by argument). |
log_ctx | Externally defined LOG module context structure. |
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.
audio_settings_enc_ctx | Pointer to the generic audio encoder settings context structure to be modified. |
str | New parameters passed in query-string or JSON format. |
log_ctx | Externally defined LOG module context structure. |
Definition at line 109 of file audio_settings.c.
|
static |
Array of character string specifying the supported sample-formats for the audio decoder output.
Definition at line 42 of file audio_settings.c.