|
|
Paraslash Audio Streaming |
| About News Download Documentation Development |
Data Fields | |
| void(* | open )(struct filter_node *fn) |
| void(* | close )(struct filter_node *fn) |
| void *(* | setup )(const struct lls_parse_result *lpr) |
| void(* | teardown )(const struct lls_parse_result *lpr, void *conf) |
| void(* | pre_monitor )(struct sched *s, void *context) |
| int(* | post_monitor )(struct sched *s, void *context) |
| btr_command_handler | execute |
Definition of a paraslash filter.
Filters describe how to transform input data into output data. This structure contains the methods which have to be defined to implement a particular filter.
Since more than one instance of the same filter may be running at the same time, all filter methods must be reentrant. In particular, no static non-constant variables must be defined.
| void(* open) (struct filter_node *fn) |
Open one instance of this filter.
This should allocate the output buffer of the given filter node and do any other filter-specific preparations like initializing the filter_node::private_data member suitably. The open function is optional, If it is provided, it is assumed to succeed.
Referenced by main().
| void(* close) (struct filter_node *fn) |
Close one instance of this filter.
Free all resources associated with the given filter instance. It's OK to set this to NULL if the filter does not need to perform any cleanup operation.
Referenced by main().
| void*(* setup) (const struct lls_parse_result *lpr) |
Prepare the filter according to command line options.
In addition to the syntactic checks which are automatically performed by the lopsub functions, some filters like to also check the command line arguments semantically. Moreover, since applications may open the filter many times with the same options, filters need a method which allows them to precompute once those parts of the setup which depend only on the command line options.
If this function pointer is not NULL, the function is called once at startup. The returned pointer value is made available to the ->open method via the ->conf pointer of struct filter_node.
Filters are supposed to abort if the setup fails. If the function returns, it is assumed to have succeeded.
| void(* teardown) (const struct lls_parse_result *lpr, void *conf) |
| void(* pre_monitor) (struct sched *s, void *context) |
Force a zero timeout if data is available in the buffer tree.
Referenced by main().
| int(* post_monitor) (struct sched *s, void *context) |
Convert (filter) input data into output data.
Referenced by main().
| btr_command_handler execute |
Answer a buffer tree query.
This optional function pointer is used for inter node communications of the buffer tree nodes. See btr_command_handler for details.
Referenced by main().