Paraslash Audio Streaming | |
About News Download Documentation Development |
common functions of para_audiod and para_write More...
#include <regex.h>
#include <lopsub.h>
#include "write_cmd.lsg.h"
#include "para.h"
#include "string.h"
#include "list.h"
#include "sched.h"
#include "buffer_tree.h"
#include "write.h"
#include "error.h"
Macros | |
#define | FOR_EACH_WRITER(i) for (i = 1; lls_cmd(i, write_cmd_suite); i++) |
Loop over all writers. More... | |
Functions | |
const struct writer * | writer_get (int wid) |
Return the writer structure from a writer ID. More... | |
const char * | writer_name (int wid) |
Return name of the writer identified by a writer ID. More... | |
int | check_writer_arg_or_die (const char *wa, struct lls_parse_result **lprp) |
Check if the given string is a valid command line for any writer. More... | |
void | register_writer_node (struct writer_node *wn, struct btr_node *parent, struct sched *s) |
Open a writer node and register the corresponding task. More... | |
void | print_writer_helps (bool detailed) |
Print the help text of all writers to stdout. More... | |
int | get_btr_sample_rate (struct btr_node *btrn, int32_t *result) |
Ask parent btr nodes for the sample rate of the current stream. More... | |
int | get_btr_channels (struct btr_node *btrn, int32_t *result) |
Ask parent btr nodes for the channel count of the current stream. More... | |
int | get_btr_sample_format (struct btr_node *btrn, int32_t *result) |
Ask parent btr nodes for the number of bits per sample and the byte sex. More... | |
common functions of para_audiod and para_write
#define FOR_EACH_WRITER | ( | i | ) | for (i = 1; lls_cmd(i, write_cmd_suite); i++) |
Loop over all writers.
const struct writer* writer_get | ( | int | wid | ) |
Return the writer structure from a writer ID.
wid | If non-positive, a pointer to the default writer is returned. |
Referenced by register_writer_node().
const char* writer_name | ( | int | wid | ) |
Return name of the writer identified by a writer ID.
wid | If non-positive, the name of the default writer is returned. |
Referenced by register_writer_node().
int check_writer_arg_or_die | ( | const char * | wa, |
struct lls_parse_result ** | lprp | ||
) |
Check if the given string is a valid command line for any writer.
wa | String of the form writer_name options. |
lprp | Contains the parsed command line on success. |
If wa is NULL
, the (configuration-dependent) default writer is assumed. Otherwise, the function checks whether wa starts with the name of a supported writer. If a valid writer name was found, the rest of the command line is passed to the config parser of this writer.
void register_writer_node | ( | struct writer_node * | wn, |
struct btr_node * | parent, | ||
struct sched * | s | ||
) |
Open a writer node and register the corresponding task.
wn | The writer node to open. |
parent | The parent btr node (the source for the writer node). |
s | The scheduler instance to register the task to. |
References btr_new_node(), writer_node::btrn, EMBRACE, writer::execute, writer::post_monitor, writer::pre_monitor, writer_node::task, task_register(), writer_node::wid, writer_get(), and writer_name().
void print_writer_helps | ( | bool | detailed | ) |
Print the help text of all writers to stdout.
detailed | Whether to print the short or the detailed help. |
References FOR_EACH_WRITER.
int get_btr_sample_rate | ( | struct btr_node * | btrn, |
int32_t * | result | ||
) |
Ask parent btr nodes for the sample rate of the current stream.
btrn | Where to start the search. |
result | Filled in by this function. |
int get_btr_channels | ( | struct btr_node * | btrn, |
int32_t * | result | ||
) |
Ask parent btr nodes for the channel count of the current stream.
btrn | See get_btr_sample_rate. |
result | See get_btr_sample_rate. |
int get_btr_sample_format | ( | struct btr_node * | btrn, |
int32_t * | result | ||
) |
Ask parent btr nodes for the number of bits per sample and the byte sex.
btrn | See get_btr_sample_rate. |
result | Contains the sample format as an enum sample_format type. |