Move gengetopt input files to m4 directory.
[paraslash.git] / m4 / gengetopt / audiod.m4
1 include(header.m4)
2 define(CURRENT_PROGRAM,para_audiod)
3 define(DEFAULT_CONFIG_FILE,~/.paraslash/audiod.conf)
4
5 <qu>
6 #########################
7 section "General options"
8 #########################
9 </qu>
10
11 include(loglevel.m4)
12 include(color.m4)
13 include(config_file.m4)
14 include(logfile.m4)
15 include(log_timing.m4)
16 include(daemon.m4)
17 include(user.m4)
18 include(group.m4)
19
20 <qu>
21 ########################
22 section "Audiod options"
23 ########################
24
25 option "force" F
26 #~~~~~~~~~~~~~~~
27 "force startup"
28 flag off
29 details="
30 If this flag is not given, para_audiod refuses to start if the
31 well-known socket file (see the --socket option) already exists
32 because this usually means that para_audiod is already running
33 and listening on that socket. After a crash or if para_audiod
34 received a SIGKILL signal, a stale socket file might remain and
35 you have to use --force once to force startup of para_audiod.
36 "
37
38 option "mode" m
39 #~~~~~~~~~~~~~~
40 "startup mode"
41 string typestr="mode"
42 default="on"
43 optional
44 details="
45 Para_audiod supports three modes of operation: On, off and
46 standby (sb). This option selects the mode that should be
47 used on startup. If para_audiod operates in \"on\" mode, it
48 will connect to para_server in order to receive its status
49 information. If para_server announces the availability of an
50 audio stream, para_audiod will automatically download, decode
51 and play the audio stream according to the given stream I/O
52 options, see below.
53
54 In \"standby\" mode, para_audiod will only receive the
55 status information from para_server but will not download
56 the audio stream.
57
58 In \"off\" mode, para_audiod does not connect para_server at
59 all, but still listens on the local socket for connections.
60 "
61
62 option "socket" s
63 #~~~~~~~~~~~~~~~~
64 "well-known socket"
65 string typestr="filename"
66 optional
67 details="
68 Para_audiod uses a \"well-known\" socket to listen
69 on for connections from para_audioc. This socket is a
70 special file in the file system; its location defaults to
71 /var/paraslash/audiod_sock.<host_name>.
72
73 para_audioc, the client program used to connect to para_audiod,
74 opens this socket in order to talk to para_audiod. If the
75 default value for para_audiod is changed, para_audioc must be
76 instructed to use also \"filename\" for connecting para_audiod.
77 "
78
79 option "user_allow" -
80 #~~~~~~~~~~~~~~~~~~~~
81 "allow this uid"
82 int typestr="uid"
83 default="-1"
84 optional
85 multiple
86 details="
87 Allow the user identified by \"uid\" to connect to para_audiod.
88 May be specified multiple times. If not specified at all,
89 all users are allowed to connect.
90
91 This feature requires unix socket credentials and is currently
92 only supported on Linux systems. On other operating systems,
93 the option is silently ignored and all local users are allowed
94 to connect to para_audiod.
95 "
96
97 option "clock_diff_count" -
98 #~~~~~~~~~~~~~~~~~~~~~~~~~~
99 "sync clock on startup"
100 int typestr="count"
101 default="0"
102 optional
103 details="
104 Check the clock difference between the host running para_server
105 and the local host running para_audiod that many times before
106 starting any stream I/0. Set this to non-zero for non-local
107 setups if the clocks of these two hosts are not synchronized
108 by ntp or similar.
109 "
110
111 #############################
112 section "Stream I/O options"
113 #############################
114
115 option "receiver" r
116 #~~~~~~~~~~~~~~~~~~
117 "select receiver"
118 string typestr="receiver_spec"
119 default="http"
120 optional
121 multiple
122 details="
123 This option may be given multiple times, for each audio format
124 separately. If multiple definitions for an audio format are
125 given, the first one is selected.
126
127 The \"receiver_spec\" consists of an audio format specifier
128 and one or more receiver arguments, separated by a colon.
129
130 The audio format specifier is a regular expression which
131 specifies the set of audio formats for which this option
132 should apply.
133
134 If any receiver options are present, the whole receiver
135 argument must be quoted:
136
137 -r 'mp3:http -i my.host.org -p 8009'
138
139 Since a single dot '.' matches the name of any audio format,
140 specifying '.' instead of 'mp3' above activates the http
141 receiver for all audio formats.
142
143 "
144
145 option "filter" f
146 #~~~~~~~~~~~~~~~~
147 "Specify the filter configuration."
148 string typestr = "filter_spec"
149 optional
150 multiple
151 details = "
152 This option may be given multiple times. The \"filter_spec\"
153 consists of an audio format specifier (see above), the name
154 of the filter, and any options for that filter. Note that
155 order matters.
156
157 The compiled-in defaults apply to all audio formats for which
158 no --filter option was given. These defaults depend on the
159 receiver being used.
160
161 For HTTP streams, only the decoder for the current audio
162 format is activated. UDP and DCCP streams, on the other
163 hand, are sent FEC-encoded by para_server. In order to play
164 such streams, the receiver output must be FEC-decoded first,
165 i.e. fed to the fecdec filter. Therefore the default for UDP
166 and DCCP streams is to activate the fecdec filter, followed
167 by the decoding filter for the audio format.
168
169 Examples:
170
171 --filter 'mp3:mp3dec'
172
173 --filter 'mp3|aac:compress --inertia 5 --damp 2'
174
175 --filter '.:fecdec'
176
177 "
178
179 option "writer" w
180 #~~~~~~~~~~~~~~~~
181 "Specify stream writer."
182 string typestr="writer_spec"
183 optional
184 multiple
185 details="
186 May be given multiple times, even multiple times for the same
187 audio format. Default value is \"alsa\" for all supported
188 audio formats. Example:
189
190 --writer 'aac|wma:oss'
191
192 "
193
194 option "stream_delay" -
195 #~~~~~~~~~~~~~~~~~~~~~~
196 "time for client sync"
197 int typestr="milliseconds"
198 default="200"
199 optional
200 details="
201 Add the given amount of milliseconds to the stream start time
202 announced by para_server and do not send data to the writer
203 before that time (modulo clock difference).
204
205 This is useful mainly for synchronizing the audio output of
206 different clients.
207 "
208 </qu>