Main Page | Modules | Data Structures | File List | Data Fields | Globals

Public functions


Detailed Description

The following public functions are found in the filter template, they are called by the host application to operate the filter.

First the livido_setup symbol is called, which returns a structure which is the filter template. The template will hold function pointers for the livido_init_f() livido_deinit_f() and livido_process_f() functions.

An host application should first setup the width, height and palette of the filter, then it can proceed to initialize the filter.

The init() must be called in order to create a filter, which will be in turn passed to process() every time video input are processed into output.


Defines

#define LIVIDO_NO_ERROR   0
 return code means no problem

#define LIVIDO_ERROR_TOO_MANY_INSTANCES   1
 can't create: plugin allows only limited number of filter instances

#define LIVIDO_ERROR_MEMORY_ALLOCATION   2
 memory allocation by the filter has failed (not enough memory?)

#define LIVIDO_ERROR_OOB_PARAMETERS   3
 parameters passed to filter have been out of bounds

#define LIVIDO_ERROR_OOB_CHANNELS   4
 plugin does not accept this kind of channel layout

#define LIVIDO_ERROR_PHERIPHERY   5
 an error occurred in handling peripheral hardware

#define LIVIDO_ERROR_INTERNAL   6
 unspecified internal plugin error

#define LIVIDO_ERROR_AUXILIARY   7
 error in an auxiliary function

#define LIVIDO_ERROR_GET_PARAMETER   8
 error occurred in get_parameter usage: wrong number of arguments or wrong format

#define LIVIDO_ERROR_SET_PARAMETER   9
 error occurred in set_parameter usage: wrong number of arguments or wrong format


Typedefs

typedef int( livido_init_f )(livido_instance_t *)
 initialize filter instance according to its parameters

typedef int( livido_deinit_f )(livido_instance_t *)
typedef int( livido_process_f )(livido_instance_t *, livido_frame_t *, livido_frame_t *)


Define Documentation

#define LIVIDO_ERROR_PHERIPHERY   5
 

an error occurred in handling peripheral hardware

If plugin deals with pheripheral hardware and there is something wrong this is returned IMPORTANT: in this case livido_instance::error_message should hold an explanation that host can present to the user.

Definition at line 552 of file livido.h.

#define LIVIDO_ERROR_TOO_MANY_INSTANCES   1
 

can't create: plugin allows only limited number of filter instances

This error usually indicates a poorly written plugin that uses static variables, or in some cases a plugin that needs to access a static resource like hardware which doesn't support multiple accesses

Definition at line 537 of file livido.h.

#define LIVIDO_NO_ERROR   0
 

return code means no problem

ERROR CODES

Definition at line 530 of file livido.h.


Typedef Documentation

typedef int( livido_deinit_f)(livido_instance_t*)
 

Free memory and cleanup internal variables.

It must be called by host for de-initialization of filters when they are no more needed.

Parameters:
livido_instance_t instance
Returns:
error code

Definition at line 512 of file livido.h.

typedef int( livido_init_f)(livido_instance_t*)
 

initialize filter instance according to its parameters

Initialize the internal buffers and variables for a instance of the filter, according to the parameters set.

This function should be used on a freshly allocated filter which has to be zeroed (use calloc(3)), as well every time a value which needs init is changed.

The init function must be REENTRANT: when called multiple times it should be aware of existing buffers and re-allocate them cleanly.

Parameters:
livido_instance_t filter instance to (re)initialize
Returns:
error code

Definition at line 501 of file livido.h.

typedef int( livido_process_f)(livido_instance_t*, livido_frame_t*, livido_frame_t*)
 

Process input frames to output frames

if plugin advertises the LIVIDO_PROPERTY_CAN_DO_INPLACE flag, the output frames pointer may be NULL after execution.

Parameters:
livido_instance_t correctly initialized plugin filter
livido_frame_t input linked list of frame(s) to be processed
livido_frame_t output linked list of frame(s) processed
Returns:
error code

Definition at line 524 of file livido.h.


Generated on Wed Apr 6 20:21:07 2005 for LiViDO by doxygen 1.3.4