|
Paraslash Audio Streaming |
About News Download Documentation Development |
Data Structures | |
struct | filter_node |
struct | filter |
Macros | |
#define | FILTER_CMD(_num) (lls_cmd(_num, filter_cmd_suite)) |
#define | FILTER_CMD_OPT(_cmd, _opt) |
#define | FILTER_CMD_OPT_RESULT(_cmd, _opt, _lpr) (lls_opt_result(LSG_FILTER_CMD_ ## _cmd ## _OPT_ ## _opt, _lpr)) |
#define | FILTER_CMD_OPT_GIVEN(_cmd, _opt, _lpr) (lls_opt_given(FILTER_CMD_OPT_RESULT(_cmd, _opt, _lpr))) |
#define | FILTER_CMD_OPT_UINT32_VAL(_cmd, _opt, _lpr) (lls_uint32_val(0, FILTER_CMD_OPT_RESULT(_cmd, _opt, _lpr))) |
#define | FILTER_CMD_OPT_STRING_VAL(_cmd, _opt, _lpr) (lls_string_val(0, FILTER_CMD_OPT_RESULT(_cmd, _opt, _lpr))) |
Functions | |
void | print_filter_helps (bool detailed) |
void | print_filter_list (void) |
int | filter_setup (const char *fa, void **conf, struct lls_parse_result **lprp) |
void | generic_filter_pre_monitor (struct sched *s, void *context) |
int | decoder_execute (const char *cmd, unsigned sample_rate, unsigned channels, char **result) |
const struct filter * | filter_get (int filter_num) |
const char * | filter_name (int filter_num) |
#define FILTER_CMD | ( | _num | ) | (lls_cmd(_num, filter_cmd_suite)) |
#define FILTER_CMD_OPT | ( | _cmd, | |
_opt | |||
) |
#define FILTER_CMD_OPT_RESULT | ( | _cmd, | |
_opt, | |||
_lpr | |||
) | (lls_opt_result(LSG_FILTER_CMD_ ## _cmd ## _OPT_ ## _opt, _lpr)) |
#define FILTER_CMD_OPT_GIVEN | ( | _cmd, | |
_opt, | |||
_lpr | |||
) | (lls_opt_given(FILTER_CMD_OPT_RESULT(_cmd, _opt, _lpr))) |
#define FILTER_CMD_OPT_UINT32_VAL | ( | _cmd, | |
_opt, | |||
_lpr | |||
) | (lls_uint32_val(0, FILTER_CMD_OPT_RESULT(_cmd, _opt, _lpr))) |
#define FILTER_CMD_OPT_STRING_VAL | ( | _cmd, | |
_opt, | |||
_lpr | |||
) | (lls_string_val(0, FILTER_CMD_OPT_RESULT(_cmd, _opt, _lpr))) |
void print_filter_helps | ( | bool | detailed | ) |
Print help text of each filter to stdout.
detailed | Whether to print short or long help. |
References FOR_EACH_FILTER.
void print_filter_list | ( | void | ) |
Print a short summary of all available filters to stdout.
For each supported filter, the filter name and the purpose text is printed in a single line. Since no options are shown, the filter list is more concise than the text obtained from print_filter_helps().
References FILTER_CMD, and FOR_EACH_FILTER.
int filter_setup | ( | const char * | fa, |
void ** | conf, | ||
struct lls_parse_result ** | lprp | ||
) |
Parse a filter command line and call the corresponding ->setup method.
fa | The filter argument. |
conf | Points to filter-specific setup upon successful return. |
lprp | Parsed command line options are returned here. |
Check if the given filter argument starts with the name of a supported filter, optionally followed by options for this filter. If yes, call the command line parser of that filter and its ->setup method.
References create_argv(), FILTER_CMD, free_argv(), and lls().
void generic_filter_pre_monitor | ( | struct sched * | s, |
void * | context | ||
) |
Request a minimal timeout if not idle.
s | The scheduler instance. |
context | Pointer to the filter node. |
If the buffer tree node of the given filter node has data available (or is in error state) a minimal I/O timeout is requested from the scheduler. Otherwise the function does nothing.
References btr_node_status(), BTR_NT_INTERNAL, filter_node::btrn, filter_node::min_iqs, and sched_min_delay().
int decoder_execute | ( | const char * | cmd, |
unsigned | sample_rate, | ||
unsigned | channels, | ||
char ** | result | ||
) |
Execute a btr command for a decoder.
The buffer tree nodes of the writers ask the parent nodes about sample_rate, channels count and sample format. This function is called by all decoders to answer these queries.
cmd | The command to be executed by the child node. |
sample_rate | Known to the decoder. |
channels | Known to the decoder. |
result | Ascii representation on the answer is stored here. |
const struct filter* filter_get | ( | int | filter_num | ) |
Obtain a reference to a filter structure.
filter_num | Between zero and NUM_SUPPORTED_FILTERS, inclusively. |
References FILTER_CMD.
const char* filter_name | ( | int | filter_num | ) |
Return the name of a filter, given its number.
filter_num | See filter_get(). |
References FILTER_CMD.