Paraslash Audio Streaming | |
About News Download Documentation Development |
common functions of para_recv and para_audiod More...
#include <regex.h>
#include <inttypes.h>
#include <lopsub.h>
#include "recv_cmd.lsg.h"
#include "para.h"
#include "error.h"
#include "list.h"
#include "sched.h"
#include "buffer_tree.h"
#include "recv.h"
#include "string.h"
Functions | |
int | check_receiver_arg (const char *ra, struct lls_parse_result **lprp) |
Check if the given string is a valid receiver specifier. More... | |
void | print_receiver_helps (bool detailed) |
Print out the help texts to all receivers. More... | |
int | generic_recv_pre_monitor (struct sched *s, struct receiver_node *rn) |
Request a minimal timeout in case of buffer tree errors. More... | |
common functions of para_recv and para_audiod
int check_receiver_arg | ( | const char * | ra, |
struct lls_parse_result ** | lprp | ||
) |
Check if the given string is a valid receiver specifier.
ra | string of the form receiver_name [options...] |
lprp | Filled in on success, undefined else. |
This function checks whether ra starts with the name of a receiver, optionally followed by options for that receiver. If a valid receiver name was found the remaining part of ra is passed to the receiver's config parser.
If a NULL pointer or an empty string is passed as the first argument, the hhtp receiver with no options is assumed.
References alloc(), create_argv(), free_argv(), lls(), PARA_EMERG_LOG, PARA_ERROR_LOG, para_strdup(), para_strerror(), and RECV_CMD.
void print_receiver_helps | ( | bool | detailed | ) |
Print out the help texts to all receivers.
detailed | Whether to print the short or the detailed help. |
References FOR_EACH_RECEIVER, and RECV_CMD.
int generic_recv_pre_monitor | ( | struct sched * | s, |
struct receiver_node * | rn | ||
) |
Request a minimal timeout in case of buffer tree errors.
s | The scheduler instance. |
rn | The buffer tree node is derived from this. |
If the buffer tree node of the given receiver node is in error or EOF state, a minimal I/O timeout is requested from the scheduler. Otherwise, the function does nothing. No file descriptors are asked to be monitored.
References btr_node_status(), BTR_NT_ROOT, receiver_node::btrn, and sched_min_delay().