1 /** \file audiod.h symbols exported from audiod.c */
2 int num_filters(int audio_format_num);
3 int get_audio_format_num(char *name);
10 extern const char *audio_formats[];
11 #define DEFINE_AUDIO_FORMAT_ARRAY const char *audio_formats[] = {"mp3", "ogg", "aac", NULL}
12 #define MAX_STREAM_SLOTS 5
14 * the possible modes of operation
16 * - off: disconnect from para_server
17 * - on: receive status information from para_server and play the audio stream
18 * - sb: only receive status information but not the audio stream
20 enum {AUDIOD_OFF, AUDIOD_ON, AUDIOD_STANDBY};
23 * describes one instance of a receiver-filter-writer chain
25 * \sa receier_node, receiver, filter, filter_node, filter_chain, writer,
26 * writer_node, writer_node_group.
29 /** number of the audio format in this slot */
31 /** writer start time */
32 struct timeval wstime;
33 /** the receiver info associated with this slot */
34 struct receiver_node *receiver_node;
35 /** the active filter chain */
36 struct filter_chain *fc;
37 /** the active writer node group */
38 struct writer_node_group *wng;
41 * the main task of audiod
43 * \sa struct task, struct sched
50 * the task for audiod's child (para_client stat)
52 * \sa struct task, struct sched
55 /** the output of the stat command is read from this fd */
57 /** stat data is stored here */
59 /** number of bytes loaded in \a buf */
61 /** the associated task structure */
63 /** do not restart client command until this time */
64 struct timeval restart_barrier;
68 int sa_time_diff_sign;
69 char *stat_item_values[NUM_STAT_ITEMS];
70 struct timeval server_stream_start;
71 struct timeval sa_time_diff;
73 extern struct status_task *stat_task;
74 extern struct slot_info slot[MAX_STREAM_SLOTS];
75 extern struct gengetopt_args_info conf;
76 extern int audiod_status;
77 extern const char *status_item_list[NUM_STAT_ITEMS];
79 void __noreturn clean_exit(int status, const char *msg);
80 int handle_connect(int accept_fd);
81 void audiod_status_dump(void);
83 /** iterate over all slots */
84 #define FOR_EACH_SLOT(_slot) for (_slot = 0; _slot < MAX_STREAM_SLOTS; _slot++)