MediaProcessors
Classes | Typedefs | Functions
video_settings.h File Reference

Video encoder and decoder generic settings. More...

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

Go to the source code of this file.

Classes

struct  video_settings_enc_ctx_s
 
struct  video_settings_dec_ctx_s
 

Typedefs

typedef struct log_ctx_s log_ctx_t
 
typedef struct cJSON cJSON
 
typedef struct video_settings_enc_ctx_s video_settings_enc_ctx_t
 
typedef struct video_settings_dec_ctx_s video_settings_dec_ctx_t
 

Functions

video_settings_enc_ctx_tvideo_settings_enc_ctx_allocate ()
 
void video_settings_enc_ctx_release (video_settings_enc_ctx_t **ref_video_settings_enc_ctx)
 
int video_settings_enc_ctx_init (volatile video_settings_enc_ctx_t *video_settings_enc_ctx)
 
void video_settings_enc_ctx_deinit (volatile video_settings_enc_ctx_t *video_settings_enc_ctx)
 
int video_settings_enc_ctx_cpy (const video_settings_enc_ctx_t *video_settings_enc_ctx_src, video_settings_enc_ctx_t *video_settings_enc_ctx_dst)
 
int video_settings_enc_ctx_restful_put (volatile video_settings_enc_ctx_t *video_settings_enc_ctx, const char *str, log_ctx_t *log_ctx)
 
int video_settings_enc_ctx_restful_get (volatile video_settings_enc_ctx_t *video_settings_enc_ctx, cJSON **ref_cjson_rest, log_ctx_t *log_ctx)
 
video_settings_dec_ctx_tvideo_settings_dec_ctx_allocate ()
 
void video_settings_dec_ctx_release (video_settings_dec_ctx_t **ref_video_settings_dec_ctx)
 
int video_settings_dec_ctx_init (volatile video_settings_dec_ctx_t *video_settings_dec_ctx)
 
void video_settings_dec_ctx_deinit (volatile video_settings_dec_ctx_t *video_settings_dec_ctx)
 
int video_settings_dec_ctx_cpy (const video_settings_dec_ctx_t *video_settings_dec_ctx_src, video_settings_dec_ctx_t *video_settings_dec_ctx_dst)
 
int video_settings_dec_ctx_restful_put (volatile video_settings_dec_ctx_t *video_settings_dec_ctx, const char *str, log_ctx_t *log_ctx)
 
int video_settings_dec_ctx_restful_get (volatile video_settings_dec_ctx_t *video_settings_dec_ctx, cJSON **ref_cjson_rest, log_ctx_t *log_ctx)
 

Detailed Description

Video encoder and decoder generic settings.

Author
Rafael Antoniello

Definition in file video_settings.h.

Typedef Documentation

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

Generic video encoder settings context structure. This structure may be extended by any specific implementation of a video encoder.

Function Documentation

video_settings_dec_ctx_t* video_settings_dec_ctx_allocate ( )

Allocate generic video decoder settings context structure.

Returns
Pointer to the generic video decoder settings context structure.

Definition at line 313 of file video_settings.c.

int video_settings_dec_ctx_cpy ( const video_settings_dec_ctx_t video_settings_dec_ctx_src,
video_settings_dec_ctx_t video_settings_dec_ctx_dst 
)

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

Parameters
video_settings_dec_ctx_srcPointer to the generic video decoder settings context structure to be copied (namely, the source structure).
video_settings_dec_ctx_dstPointer to the generic video 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 356 of file video_settings.c.

void video_settings_dec_ctx_deinit ( volatile video_settings_dec_ctx_t video_settings_dec_ctx)

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

Parameters
video_settings_dec_ctxPointer to the generic video decoder settings context structure to be de-initialized.

Definition at line 349 of file video_settings.c.

int video_settings_dec_ctx_init ( volatile video_settings_dec_ctx_t video_settings_dec_ctx)

Initialize video decoder generic settings to defaults.

Parameters
video_settings_dec_ctxPointer to the generic video 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 334 of file video_settings.c.

void video_settings_dec_ctx_release ( video_settings_dec_ctx_t **  ref_video_settings_dec_ctx)

Release generic video decoder settings context structure previously allocated by 'video_settings_dec_ctx_allocate()'.

Parameters
ref_video_settings_dec_ctx

Definition at line 319 of file video_settings.c.

int video_settings_dec_ctx_restful_get ( volatile video_settings_dec_ctx_t video_settings_dec_ctx,
cJSON **  ref_cjson_rest,
log_ctx_t log_ctx 
)

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

Parameters
video_settings_dec_ctxPointer to the generic video 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 434 of file video_settings.c.

int video_settings_dec_ctx_restful_put ( volatile video_settings_dec_ctx_t video_settings_dec_ctx,
const char *  str,
log_ctx_t log_ctx 
)

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

Parameters
video_settings_dec_ctxPointer to the generic video 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 372 of file video_settings.c.

video_settings_enc_ctx_t* video_settings_enc_ctx_allocate ( )

Allocate generic video encoder settings context structure.

Returns
Pointer to the generic video encoder settings context structure.

Definition at line 38 of file video_settings.c.

int video_settings_enc_ctx_cpy ( const video_settings_enc_ctx_t video_settings_enc_ctx_src,
video_settings_enc_ctx_t video_settings_enc_ctx_dst 
)

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

Parameters
video_settings_enc_ctx_srcPointer to the generic video encoder settings context structure to be copied (namely, the source structure).
video_settings_enc_ctx_dstPointer to the generic video 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 87 of file video_settings.c.

void video_settings_enc_ctx_deinit ( volatile video_settings_enc_ctx_t video_settings_enc_ctx)

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

Parameters
video_settings_enc_ctxPointer to the generic video encoder settings context structure to be de-initialized.

Definition at line 80 of file video_settings.c.

int video_settings_enc_ctx_init ( volatile video_settings_enc_ctx_t video_settings_enc_ctx)

Initialize video encoder generic settings to defaults.

Parameters
video_settings_enc_ctxPointer to the generic video 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 62 of file video_settings.c.

void video_settings_enc_ctx_release ( video_settings_enc_ctx_t **  ref_video_settings_enc_ctx)

Release generic video encoder settings context structure previously allocated by 'video_settings_enc_ctx_allocate()'.

Parameters
ref_video_settings_enc_ctx

Definition at line 44 of file video_settings.c.

int video_settings_enc_ctx_restful_get ( volatile video_settings_enc_ctx_t video_settings_enc_ctx,
cJSON **  ref_cjson_rest,
log_ctx_t log_ctx 
)

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

Parameters
video_settings_enc_ctxPointer to the generic video 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 237 of file video_settings.c.

int video_settings_enc_ctx_restful_put ( volatile video_settings_enc_ctx_t video_settings_enc_ctx,
const char *  str,
log_ctx_t log_ctx 
)

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

Parameters
video_settings_enc_ctxPointer to the generic video 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 106 of file video_settings.c.