MediaProcessors
|
#include <proc_if.h>
Public Attributes | |
const char * | proc_name |
const char * | proc_type |
const char * | proc_mime |
uint64_t | flag_proc_features |
proc_ctx_t *(* | open )(const proc_if_t *proc_if, const char *settings_str, log_ctx_t *log_ctx, va_list arg) |
void(* | close )(proc_ctx_t **ref_proc_ctx) |
int(* | send_frame )(proc_ctx_t *proc_ctx, const proc_frame_ctx_t *proc_frame_ctx) |
int(* | send_frame_nodup )(proc_ctx_t *proc_ctx, proc_frame_ctx_t **ref_proc_frame_ctx) |
int(* | recv_frame )(proc_ctx_t *proc_ctx, proc_frame_ctx_t **ref_proc_frame_ctx) |
int(* | unblock )(proc_ctx_t *proc_ctx) |
int(* | rest_put )(proc_ctx_t *proc_ctx, const char *str) |
int(* | rest_get )(proc_ctx_t *proc_ctx, const proc_if_rest_fmt_t rest_fmt, void **ref_reponse) |
int(* | process_frame )(proc_ctx_t *proc_ctx, fifo_ctx_t *fifo_ctx_iput, fifo_ctx_t *fifo_ctx_oput) |
int(* | opt )(proc_ctx_t *proc_ctx, const char *tag, va_list arg) |
void *(* | iput_fifo_elem_opaque_dup )(const proc_frame_ctx_t *proc_frame_ctx) |
void(* | iput_fifo_elem_opaque_release )(void **ref_t) |
proc_frame_ctx_t *(* | oput_fifo_elem_opaque_dup )(const void *t) |
PROC interface structure prototype. Each PROC type will define a static and unambiguous interface of this type.
void(* proc_if_s::close) (proc_ctx_t **ref_proc_ctx) |
Ends processing thread, de-initialize and release the processor (PROC) context structure and all the related resources. This callback is mandatory (cannot be NULL).
ref_proc_ctx | Reference to the pointer to the processor (PROC) context structure to be release, that was obtained in a previous call to the 'open()' callback method. Pointer is set to NULL on return. |
uint64_t proc_if_s::flag_proc_features |
void*(* proc_if_s::iput_fifo_elem_opaque_dup) (const proc_frame_ctx_t *proc_frame_ctx) |
This callback is registered in the FIFO management API and is used to internally duplicate the input frame structure when it is pushed to the processor input FIFO. Typically, this callback is used to transform the input type proc_frame_ctx_t to another structure type that will be actually allocated in the FIFO. This callback is optional, and can be set to NULL. In that case, the processor input frame structure is assumed to be of type proc_frame_ctx_t (thus will be duplicated using function 'proc_frame_ctx_allocate()').
proc_frame_ctx | Processor frame context structure (see proc_frame_ctx_t). return Opaque structure (can be private format) duplicating the input frame. This structure will be pushed to the processor input FIFO. |
void(* proc_if_s::iput_fifo_elem_opaque_release) (void **ref_t) |
This callback is registered in the FIFO management API and is complementary to the callback 'iput_fifo_elem_opaque_dup()': it is the function used to release the elements duplicated and stored in the processor input FIFO using 'iput_fifo_elem_opaque_dup()'. This callback is optional, and can be set to NULL. In that case, the processor input frame structure is assumed to be of type proc_frame_ctx_t (thus will be released using function 'proc_frame_ctx_release()').
ref_t | Opaque reference to a pointer to the structure type to be released. |
proc_ctx_t*(* proc_if_s::open) (const proc_if_t *proc_if, const char *settings_str, log_ctx_t *log_ctx, va_list arg) |
Allocates specific processor (PROC) context structure, initializes, and launches processing thread. This callback is mandatory (cannot be NULL).
proc_if | Pointer to the processor interface structure (static and unambiguous interface of the type of processor we are opening). |
settings_str | Character string containing initial settings for the processor. String format can be either a query-string or JSON. |
log_ctx | Pointer to the LOG module context structure. |
arg | Variable list of parameters defined by user. |
int(* proc_if_s::opt) (proc_ctx_t *proc_ctx, const char *tag, va_list arg) |
Request for specific processor options. This callback is optional (can be set to NULL).
proc_ctx | Pointer to the processor (PROC) context structure obtained in a previous call to the 'open()' callback method. |
tag | Processor option tag, namely, option identifier string. Refer to the specific implementation of this function to see the available options. arg Variable list of parameters according to selected option. Refer to the specific implementation of this function to see the parameters corresponding to each available option. |
proc_frame_ctx_t*(* proc_if_s::oput_fifo_elem_opaque_dup) (const void *t) |
This callback is registered in the FIFO management API and is used to internally duplicate the processor's output frame structure when it is pushed into the processor output FIFO. Typically, this callback is used to transform the processor's opaque output type to the type proc_frame_ctx_t that will be actually allocated in the FIFO. This callback is optional, and can be set to NULL. In that case, the processor output frame structure is assumed to be of type proc_frame_ctx_t (thus will be duplicated using function 'proc_frame_ctx_allocate()').
t | Opaque processor's output frame structure. return Processor frame context structure (see proc_frame_ctx_t). This structure will be pushed to the processor output FIFO. |
const char* proc_if_s::proc_mime |
Media type and sub-type (formerly known as MIME types and sub-type). See http://www.iana.org/assignments/media-types/media-types.xhtml. For muxers we use by default: "application/octet-stream" This field is mandatory (can not be set to NULL).
const char* proc_if_s::proc_name |
const char* proc_if_s::proc_type |
int(* proc_if_s::process_frame) (proc_ctx_t *proc_ctx, fifo_ctx_t *fifo_ctx_iput, fifo_ctx_t *fifo_ctx_oput) |
Process one frame of data. The frame is read from the input FIFO buffer and is completely processed. If an output frame is produced, is written to the output FIFO buffer. This callback is optional (can be set to NULL).
proc_ctx | Pointer to the processor (PROC) context structure obtained in a previous call to the 'open()' callback method. |
fifo_ctx_iput | Pointer to the input FIFO buffer context structure. |
fifo_ctx_oput | Pointer to the output FIFO buffer context structure. |
int(* proc_if_s::recv_frame) (proc_ctx_t *proc_ctx, proc_frame_ctx_t **ref_proc_frame_ctx) |
int(* proc_if_s::rest_get) (proc_ctx_t *proc_ctx, const proc_if_rest_fmt_t rest_fmt, void **ref_reponse) |
Get current processor (PROC) settings. Settings are returned by argument in a character string in JSON format. This method is asynchronous and thread safe. This callback is optional (can be set to NULL).
proc_ctx | Pointer to the processor (PROC) context structure obtained in a previous call to the 'open()' callback method. |
rest_fmt | Indicates the format in which the response data is to be returned. Available formats are enumerated at 'proc_if_rest_fmt_t'. |
ref_reponse | Reference to the pointer to a data structure returning the processor's representational state (including current settings). The returned data structure is formatted according to what is indicated in the parameter 'rest_fmt'. |
int(* proc_if_s::rest_put) (proc_ctx_t *proc_ctx, const char *str) |
Put new processor (PROC) settings. Parameters can be passed either as a query-string or JSON. This method is asynchronous and thread safe. This callback is optional (can be set to NULL).
proc_ctx | Pointer to the processor (PROC) context structure obtained in a previous call to the 'open()' callback method. |
str | Pointer to a character string containing new settings for the processor. String format can be either a query-string or JSON. |
int(* proc_if_s::send_frame) (proc_ctx_t *proc_ctx, const proc_frame_ctx_t *proc_frame_ctx) |
int(* proc_if_s::unblock) (proc_ctx_t *proc_ctx) |