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