- * \sa receier_node, receiver, filter, filter_node, filter_chain_info
- */
-struct slot_info {
-/** number of the audio format in this slot */
- int format;
-/** the file descriptor of the writer */
- int write_fd;
-/** the process id of the writer */
- pid_t wpid;
-/** time of the last successful read from the receiver */
- struct timeval rtime;
-/** time the last write to the write fd happend */
- struct timeval wtime;
-/** writer start time */
- struct timeval wstime;
-/** did we include \a write_fd in the fdset */
- int wcheck;
-/** set to one if we have sent the TERM signal to \a wpid */
- int wkilled;
-/** the receiver info associated with this slot */
- struct receiver_node *receiver_node;
-/** the active filter chain */
- struct filter_chain_info *fci;
-};
-
-static struct slot_info slot[MAX_STREAM_SLOTS];
-
-/** defines one command of para_audiod */
-struct audiod_command {
-/** the name of the command */
-const char *name;
-/** pointer to the function that handles the command */
-int (*handler)(int, int, char**);
-/** one-line description of the command */
-const char *description;
-/** summary of the command line options */
-const char *synopsis;
-/** the long help text */
-const char *help;
-};
-
-extern const char *status_item_list[NUM_STAT_ITEMS];
-
-static int com_grab(int, int, char **);
-static int com_cycle(int, int, char **);
-static int com_help(int, int, char **);
-static int com_off(int, int, char **);
-static int com_on(int, int, char **);
-static int com_sb(int, int, char **);
-static int com_stat(int, int, char **);
-static int com_term(int, int, char **);
-static int stat_pipe = -1, signal_pipe;
-
-static struct gengetopt_args_info conf;
-static struct timeval server_stream_start, sa_time_diff;
-static int playing, current_decoder = -1,
- audiod_status = AUDIOD_ON, offset_seconds, length_seconds,
- sa_time_diff_sign = 1, audiod_socket = -1;
-static char *af_status, /* the audio format announced in server status */
- *socket_name, *hostname;
-static char *stat_item_values[NUM_STAT_ITEMS];
-static FILE *logfile;
-static const struct timeval restart_delay = {0, 300 * 1000};
-
-static struct audio_format_info afi[NUM_AUDIO_FORMATS];
-
-static struct audiod_command cmds[] = {
-{
-.name = "cycle",
-.handler = com_cycle,
-.description = "switch to next mode",
-.synopsis = "cycle",
-.help =