Filter-related structures and exported symbols from filter_common.c.
More...
|
#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))) |
|
Filter-related structures and exported symbols from filter_common.c.
◆ FILTER_CMD
#define FILTER_CMD |
( |
|
_num | ) |
(lls_cmd(_num, filter_cmd_suite)) |
◆ FILTER_CMD_OPT
#define FILTER_CMD_OPT |
( |
|
_cmd, |
|
|
|
_opt |
|
) |
| |
Value: (lls_opt( \
LSG_FILTER_CMD_ ## _cmd ## _OPT_ ## _opt, \
◆ FILTER_CMD_OPT_RESULT
#define FILTER_CMD_OPT_RESULT |
( |
|
_cmd, |
|
|
|
_opt, |
|
|
|
_lpr |
|
) |
| (lls_opt_result(LSG_FILTER_CMD_ ## _cmd ## _OPT_ ## _opt, _lpr)) |
◆ FILTER_CMD_OPT_GIVEN
#define FILTER_CMD_OPT_GIVEN |
( |
|
_cmd, |
|
|
|
_opt, |
|
|
|
_lpr |
|
) |
| (lls_opt_given(FILTER_CMD_OPT_RESULT(_cmd, _opt, _lpr))) |
◆ FILTER_CMD_OPT_UINT32_VAL
#define FILTER_CMD_OPT_UINT32_VAL |
( |
|
_cmd, |
|
|
|
_opt, |
|
|
|
_lpr |
|
) |
| (lls_uint32_val(0, FILTER_CMD_OPT_RESULT(_cmd, _opt, _lpr))) |
◆ FILTER_CMD_OPT_STRING_VAL
#define FILTER_CMD_OPT_STRING_VAL |
( |
|
_cmd, |
|
|
|
_opt, |
|
|
|
_lpr |
|
) |
| (lls_string_val(0, FILTER_CMD_OPT_RESULT(_cmd, _opt, _lpr))) |
◆ print_filter_helps()
void print_filter_helps |
( |
bool |
detailed | ) |
|
Print help text of each filter to stdout.
- Parameters
-
detailed | Whether to print short or long help. |
References FOR_EACH_FILTER.
◆ print_filter_list()
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.
◆ filter_setup()
int filter_setup |
( |
const char * |
fa, |
|
|
void ** |
conf, |
|
|
struct lls_parse_result ** |
lprp |
|
) |
| |
Parse a filter command line and call the corresponding ->setup method.
- Parameters
-
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.
- Returns
- This function either succeeds or does not return. On success, the number of the filter is returned and conf is initialized to point to the filter configuration as returned by the filter's ->setup() method, if any. Moreover, *lprp is initialized to contain the parsed command line options. On errors, the function calls exit(EXIT_FAILURE).
References create_argv(), FILTER_CMD, free_argv(), and lls().
◆ generic_filter_pre_monitor()
void generic_filter_pre_monitor |
( |
struct sched * |
s, |
|
|
void * |
context |
|
) |
| |
◆ decoder_execute()
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.
- Parameters
-
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. |
- Returns
- Standard.
◆ filter_get()
const struct filter* filter_get |
( |
int |
filter_num | ) |
|
Obtain a reference to a filter structure.
- Parameters
-
filter_num | Between zero and NUM_SUPPORTED_FILTERS, inclusively. |
- Returns
- Pointer to the filter identified by the given filter number, or NULL if the filter number is out of range.
- See also
- filter_name().
References FILTER_CMD.
◆ filter_name()
const char* filter_name |
( |
int |
filter_num | ) |
|
Return the name of a filter, given its number.
- Parameters
-
- Returns
- A pointer to a string literal, or NULL if filter_num is out of range. The caller must not attempt to call free(3) on the returned pointer.
References FILTER_CMD.