MediaProcessors
Classes | Macros | Typedefs | Enumerations | Functions | Variables
proc_if.h File Reference

PROC interface prototype related definitions and functions. More...

#include <sys/types.h>
#include <inttypes.h>
#include <stdarg.h>
Include dependency graph for proc_if.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  proc_sample_fmt_lut_s
 
struct  proc_frame_ctx_s
 
struct  proc_if_s
 

Macros

#define PROC_FRAME_MAX_WIDTH   4096
 
#define PROC_FRAME_MAX_HEIGHT   4096
 
#define PROC_FRAME_NUM_DATA_POINTERS   8
 
#define PROC_FEATURE_BITRATE   1
 
#define PROC_FEATURE_REGISTER_PTS   2
 
#define PROC_FEATURE_LATENCY   4
 

Typedefs

typedef struct proc_ctx_s proc_ctx_t
 
typedef struct proc_if_s proc_if_t
 
typedef struct log_ctx_s log_ctx_t
 
typedef struct fifo_ctx_s fifo_ctx_t
 
typedef enum proc_sample_fmt_enum proc_sample_fmt_t
 
typedef struct proc_sample_fmt_lut_s proc_sample_fmt_lut_t
 
typedef struct proc_frame_ctx_s proc_frame_ctx_t
 
typedef enum proc_if_rest_fmt_enum proc_if_rest_fmt_t
 

Enumerations

enum  proc_sample_fmt_enum { PROC_IF_FMT_UNDEF = 0, PROC_IF_FMT_YUV420P, PROC_IF_FMT_S16, PROC_IF_FMT_S16P }
 
enum  proc_if_rest_fmt_enum { PROC_IF_REST_FMT_CHAR, PROC_IF_REST_FMT_CJSON, PROC_IF_REST_FMT_BINARY, PROC_IF_REST_FMT_ENUM_MAX }
 

Functions

proc_frame_ctx_tproc_frame_ctx_allocate ()
 
proc_frame_ctx_tproc_frame_ctx_dup (const proc_frame_ctx_t *proc_frame_ctx_arg)
 
void proc_frame_ctx_release (proc_frame_ctx_t **ref_proc_frame_ctx)
 
proc_if_tproc_if_allocate ()
 
proc_if_tproc_if_dup (const proc_if_t *proc_if_arg)
 
int proc_if_cmp (const proc_if_t *proc_if1, const proc_if_t *proc_if2)
 
void proc_if_release (proc_if_t **ref_proc_if)
 

Variables

const proc_sample_fmt_lut_t proc_sample_fmt_lut []
 

Detailed Description

PROC interface prototype related definitions and functions.

Author
Rafael Antoniello

Definition in file proc_if.h.

Macro Definition Documentation

#define PROC_FRAME_MAX_HEIGHT   4096

Maximum height for the input/output processor frame.

Definition at line 48 of file proc_if.h.

#define PROC_FRAME_MAX_WIDTH   4096

Maximum width for the input/output processor frame.

Definition at line 44 of file proc_if.h.

Typedef Documentation

Input/output frame context structure. This aims to be a generic input/output frame structure for any kind of processing (e.g. video, audio, subtitles, data, ...). Not all the fields will be necessarily used by all the processors, in fact, most of the processors will only use a subset of these fields.

Processor REST-response (in GET operation) format enumerator. This definitions are used in the function callback 'proc_if_s::rest_get()' to indicate the format desired of the response.

typedef struct proc_if_s proc_if_t

PROC interface structure prototype. Each PROC type will define a static and unambiguous interface of this type.

Definition at line 37 of file proc_if.h.

Processor samples format look-up table entry. Each entry of the look-up table consists in an identifier and a descriptive text.

Processor samples format types (enumeration of supported formats).

Enumeration Type Documentation

Processor REST-response (in GET operation) format enumerator. This definitions are used in the function callback 'proc_if_s::rest_get()' to indicate the format desired of the response.

Enumerator
PROC_IF_REST_FMT_CHAR 

Character string response.

PROC_IF_REST_FMT_CJSON 

cJSON structure response

PROC_IF_REST_FMT_BINARY 

C structure or block of binary data.

Definition at line 157 of file proc_if.h.

Processor samples format types (enumeration of supported formats).

Enumerator
PROC_IF_FMT_UNDEF 

Undefined format.

PROC_IF_FMT_YUV420P 

Planar YUV 4:2:0 with 12bpp (video)

PROC_IF_FMT_S16 

Interleaved signed 16 bits (typically audio)

PROC_IF_FMT_S16P 

Planar signed 16 bits (typically audio)

Definition at line 53 of file proc_if.h.

Function Documentation

proc_frame_ctx_t* proc_frame_ctx_allocate ( )

Allocate an uninitialized input/ouput processor frame structure.

Returns
Pointer to the newly allocated input/output processor frame structure; NULL if fails.

Definition at line 47 of file proc_if.c.

proc_frame_ctx_t* proc_frame_ctx_dup ( const proc_frame_ctx_t proc_frame_ctx_arg)

Duplicate an input/output processor frame structure.

Parameters
proc_frame_ctx_argPointer to the input/output processor frame structure to be duplicated.
Returns
Pointer to the new allocated replica of the given input structure; NULL if fails.

Definition at line 52 of file proc_if.c.

void proc_frame_ctx_release ( proc_frame_ctx_t **  ref_proc_frame_ctx)

Release an input/output processor frame structure.

Parameters
ref_proc_frame_ctxReference to the pointer to the input/output processor frame structure to be released. Pointer is set to NULL on return.

Definition at line 125 of file proc_if.c.

proc_if_t* proc_if_allocate ( )

Allocate an uninitialized processor interface context structure.

Returns
Pointer to the newly allocated processor interface context structure; NULL if fails.

Definition at line 142 of file proc_if.c.

int proc_if_cmp ( const proc_if_t proc_if1,
const proc_if_t proc_if2 
)

Compares if given processor interfaces are the equal.

Parameters
proc_if1Pointer to the first processor interface context structure to be compared.
proc_if2Pointer to the second processor interface context structure to be compared.
Returns
Value 0 if given contexts are equal, otherwise non-zero value is returned.

Definition at line 187 of file proc_if.c.

proc_if_t* proc_if_dup ( const proc_if_t proc_if_arg)

Duplicate a processor interface context structure.

Parameters
proc_if_argPointer to the processor interface context structure to be duplicated.
Returns
Pointer to a new allocated replica of the given input structure; NULL if fails.

Definition at line 147 of file proc_if.c.

void proc_if_release ( proc_if_t **  ref_proc_if)

Release a processor interface context structure.

Parameters
Referenceto the pointer to the processor interface context structure to be released. Pointer is set to NULL on return.

Definition at line 232 of file proc_if.c.

Variable Documentation

const proc_sample_fmt_lut_t proc_sample_fmt_lut[]

Processor samples format look-up table.

Definition at line 38 of file proc_if.c.