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 *) |
|
|
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. |
|
|
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 |
|
|
return code means no problem ERROR CODES |
|
|
Free memory and cleanup internal variables. It must be called by host for de-initialization of filters when they are no more needed.
|
|
|
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.
|
|
|
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.
|
1.3.4