MediaProcessors
Classes | Typedefs | Functions | Variables
bypass.c File Reference
#include "bypass.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <pthread.h>
#include <libcjson/cJSON.h>
#include <libmediaprocsutils/log.h>
#include <libmediaprocsutils/stat_codes.h>
#include <libmediaprocsutils/check_utils.h>
#include <libmediaprocsutils/fifo.h>
#include <libmediaprocs/proc_if.h>
#include <libmediaprocs/proc.h>
Include dependency graph for bypass.c:

Go to the source code of this file.

Classes

struct  bypass_settings_ctx_s
 
struct  bypass_ctx_s
 

Typedefs

typedef struct bypass_settings_ctx_s bypass_settings_ctx_t
 
typedef struct bypass_ctx_s bypass_ctx_t
 

Functions

static proc_ctx_tbypass_open (const proc_if_t *proc_if, const char *settings_str, log_ctx_t *log_ctx, va_list arg)
 
static void bypass_close (proc_ctx_t **ref_proc_ctx)
 
static int bypass_process_frame (proc_ctx_t *proc_ctx, fifo_ctx_t *iput_fifo_ctx, fifo_ctx_t *oput_fifo_ctx)
 
static int bypass_rest_put (proc_ctx_t *proc_ctx, const char *str)
 
static int bypass_rest_get (proc_ctx_t *proc_ctx, const proc_if_rest_fmt_t rest_fmt, void **ref_reponse)
 
static int bypass_settings_ctx_init (volatile bypass_settings_ctx_t *bypass_settings_ctx, log_ctx_t *log_ctx)
 
static void bypass_settings_ctx_deinit (volatile bypass_settings_ctx_t *bypass_settings_ctx, log_ctx_t *log_ctx)
 

Variables

const proc_if_t proc_if_bypass
 

Detailed Description

Author
Rafael Antoniello

Definition in file bypass.c.

Typedef Documentation

typedef struct bypass_ctx_s bypass_ctx_t

Bypass processor context structure.

Bypass processor settings context structure.

Function Documentation

static void bypass_close ( proc_ctx_t **  ref_proc_ctx)
static

Implements the proc_if_s::close callback. See .proc_if.h for further details.

Definition at line 146 of file bypass.c.

static proc_ctx_t * bypass_open ( const proc_if_t proc_if,
const char *  settings_str,
log_ctx_t log_ctx,
va_list  arg 
)
static

Implements the proc_if_s::open callback. See .proc_if.h for further details.

Definition at line 107 of file bypass.c.

static int bypass_process_frame ( proc_ctx_t proc_ctx,
fifo_ctx_t iput_fifo_ctx,
fifo_ctx_t oput_fifo_ctx 
)
static

Implements the proc_if_s::process_frame callback. See .proc_if.h for further details.

Definition at line 170 of file bypass.c.

static int bypass_rest_get ( proc_ctx_t proc_ctx,
const proc_if_rest_fmt_t  rest_fmt,
void **  ref_reponse 
)
static

Implements the proc_if_s::rest_get callback. See .proc_if.h for further details.

Definition at line 241 of file bypass.c.

static int bypass_rest_put ( proc_ctx_t proc_ctx,
const char *  str 
)
static

Implements the proc_if_s::rest_put callback. See .proc_if.h for further details.

Definition at line 215 of file bypass.c.

static void bypass_settings_ctx_deinit ( volatile bypass_settings_ctx_t bypass_settings_ctx,
log_ctx_t log_ctx 
)
static

Release specific bypass processor settings (allocated in heap memory).

Parameters
bypass_settings_ctx
log_ctx

Definition at line 352 of file bypass.c.

static int bypass_settings_ctx_init ( volatile bypass_settings_ctx_t bypass_settings_ctx,
log_ctx_t log_ctx 
)
static

Initialize specific bypass processor settings to defaults.

Parameters
bypass_settings_ctx
log_ctx
Returns
Status code (STAT_SUCCESS code in case of success, for other code values please refer to .stat_codes.h).

Definition at line 332 of file bypass.c.

Variable Documentation

const proc_if_t proc_if_bypass
Initial value:
=
{
"bypass", "bypass", "video/bypass",
(uint64_t)(PROC_FEATURE_BITRATE|PROC_FEATURE_REGISTER_PTS),
proc_send_frame_default1,
NULL,
proc_recv_frame_default1,
NULL,
NULL,
(void(*)(void**))proc_frame_ctx_release,
(proc_frame_ctx_t*(*)(const void*))proc_frame_ctx_dup
}
void proc_frame_ctx_release(proc_frame_ctx_t **ref_proc_frame_ctx)
Definition: proc_if.c:125
static int bypass_process_frame(proc_ctx_t *proc_ctx, fifo_ctx_t *iput_fifo_ctx, fifo_ctx_t *oput_fifo_ctx)
Definition: bypass.c:170
static int bypass_rest_get(proc_ctx_t *proc_ctx, const proc_if_rest_fmt_t rest_fmt, void **ref_reponse)
Definition: bypass.c:241
static proc_ctx_t * bypass_open(const proc_if_t *proc_if, const char *settings_str, log_ctx_t *log_ctx, va_list arg)
Definition: bypass.c:107
static int bypass_rest_put(proc_ctx_t *proc_ctx, const char *str)
Definition: bypass.c:215
proc_frame_ctx_t * proc_frame_ctx_dup(const proc_frame_ctx_t *proc_frame_ctx_arg)
Definition: proc_if.c:52
static void bypass_close(proc_ctx_t **ref_proc_ctx)
Definition: bypass.c:146

Processor interface implementing the "bypass" processor.

Definition at line 84 of file bypass.c.