]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Move gengetopt input files to m4 directory.
authorAndre Noll <maan@systemlinux.org>
Sun, 22 Jul 2012 14:11:11 +0000 (16:11 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 27 Aug 2012 10:59:53 +0000 (12:59 +0200)
This separates the gengetopt input directory from its output directory.
All gengetopt m4 file are moved to the new m4/gengetopt directory.

As a consequence of this cleanup, we may get rid of the .gitignore
file for the generated ggo files, which is a good thing as it was
hard to keep it up to date.

72 files changed:
Makefile.in
ggo/.gitignore [deleted file]
ggo/afh.m4 [deleted file]
ggo/alsa_write.m4 [deleted file]
ggo/amp_filter.m4 [deleted file]
ggo/ao_write.m4 [deleted file]
ggo/audioc.m4 [deleted file]
ggo/audiod.m4 [deleted file]
ggo/client.m4 [deleted file]
ggo/color.m4 [deleted file]
ggo/complete.m4 [deleted file]
ggo/compress_filter.m4 [deleted file]
ggo/config_file.m4 [deleted file]
ggo/daemon.m4 [deleted file]
ggo/dccp_recv.m4 [deleted file]
ggo/fade.m4 [deleted file]
ggo/file_write.m4 [deleted file]
ggo/filter.m4 [deleted file]
ggo/fsck.m4 [deleted file]
ggo/group.m4 [deleted file]
ggo/gui.m4 [deleted file]
ggo/header.m4 [deleted file]
ggo/history_file.m4 [deleted file]
ggo/http_recv.m4 [deleted file]
ggo/log_timing.m4 [deleted file]
ggo/logfile.m4 [deleted file]
ggo/loglevel.m4 [deleted file]
ggo/makefile [deleted file]
ggo/mp3dec_filter.m4 [deleted file]
ggo/oss_write.m4 [deleted file]
ggo/osx_write.m4 [deleted file]
ggo/prebuffer_filter.m4 [deleted file]
ggo/recv.m4 [deleted file]
ggo/server.m4 [deleted file]
ggo/udp_recv.m4 [deleted file]
ggo/user.m4 [deleted file]
ggo/write.m4 [deleted file]
m4/gengetopt/afh.m4 [new file with mode: 0644]
m4/gengetopt/alsa_write.m4 [new file with mode: 0644]
m4/gengetopt/amp_filter.m4 [new file with mode: 0644]
m4/gengetopt/ao_write.m4 [new file with mode: 0644]
m4/gengetopt/audioc.m4 [new file with mode: 0644]
m4/gengetopt/audiod.m4 [new file with mode: 0644]
m4/gengetopt/client.m4 [new file with mode: 0644]
m4/gengetopt/color.m4 [new file with mode: 0644]
m4/gengetopt/complete.m4 [new file with mode: 0644]
m4/gengetopt/compress_filter.m4 [new file with mode: 0644]
m4/gengetopt/config_file.m4 [new file with mode: 0644]
m4/gengetopt/daemon.m4 [new file with mode: 0644]
m4/gengetopt/dccp_recv.m4 [new file with mode: 0644]
m4/gengetopt/fade.m4 [new file with mode: 0644]
m4/gengetopt/file_write.m4 [new file with mode: 0644]
m4/gengetopt/filter.m4 [new file with mode: 0644]
m4/gengetopt/fsck.m4 [new file with mode: 0644]
m4/gengetopt/group.m4 [new file with mode: 0644]
m4/gengetopt/gui.m4 [new file with mode: 0644]
m4/gengetopt/header.m4 [new file with mode: 0644]
m4/gengetopt/history_file.m4 [new file with mode: 0644]
m4/gengetopt/http_recv.m4 [new file with mode: 0644]
m4/gengetopt/log_timing.m4 [new file with mode: 0644]
m4/gengetopt/logfile.m4 [new file with mode: 0644]
m4/gengetopt/loglevel.m4 [new file with mode: 0644]
m4/gengetopt/makefile [new file with mode: 0644]
m4/gengetopt/mp3dec_filter.m4 [new file with mode: 0644]
m4/gengetopt/oss_write.m4 [new file with mode: 0644]
m4/gengetopt/osx_write.m4 [new file with mode: 0644]
m4/gengetopt/prebuffer_filter.m4 [new file with mode: 0644]
m4/gengetopt/recv.m4 [new file with mode: 0644]
m4/gengetopt/server.m4 [new file with mode: 0644]
m4/gengetopt/udp_recv.m4 [new file with mode: 0644]
m4/gengetopt/user.m4 [new file with mode: 0644]
m4/gengetopt/write.m4 [new file with mode: 0644]

index ed0b9b0562a75adc745d3c1f404d5e75529fd4eb..3463553c15800ae6fd9917ef1e11701a3d038425 100644 (file)
@@ -21,7 +21,7 @@ codename := volatile relativity
 
 GIT_VERSION := $(shell ./GIT-VERSION-GEN git-version.h)
 
-m4_ggo_dir := ggo
+m4_ggo_dir := m4/gengetopt
 ggo_dir := ggo
 object_dir := objects
 man_dir := man/man1
@@ -147,6 +147,8 @@ $(object_dir):
        mkdir -p $@
 $(man_dir):
        mkdir -p $@
+$(ggo_dir):
+       mkdir -p $@
 
 $(object_dir)/crypt.o: crypt.c | $(object_dir)
        @[ -z "$(Q)" ] || echo 'CC $<'
@@ -286,8 +288,8 @@ clean:
 
 clean2: clean
        @[ -z "$(Q)" ] || echo 'CLEAN2'
-       $(Q) rm -rf man $(object_dir) $(cmdline_dir)
-       $(Q) rm -f *_command_list.* *_completion.h $(ggo_dir)/*.ggo
+       $(Q) rm -rf man $(object_dir) $(cmdline_dir) $(ggo_dir)
+       $(Q) rm -f *_command_list.* *_completion.h
 distclean: clean2 test-clean
        @[ -z "$(Q)" ] || echo 'DISTCLEAN'
        $(Q) rm -f Makefile autoscan.log config.status config.log
diff --git a/ggo/.gitignore b/ggo/.gitignore
deleted file mode 100644 (file)
index 82d505b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-afh.ggo
-audioc.ggo
-audiod.ggo
-client.ggo
-filter.ggo
-fsck.ggo
-gui.ggo
-recv.ggo
-server.ggo
-write.ggo
-ao_write.ggo
-alsa_write.ggo
diff --git a/ggo/afh.m4 b/ggo/afh.m4
deleted file mode 100644 (file)
index ba7d790..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-include(header.m4)
-<qu>
-text "
-para_afh, the audio format handler tool, is a stand-alone program
-contained in the paraslash package for analyzing and streaming audio
-files. It can be used to
-
-       - print tech info about the given audio file to stdout.
-       In particular, the 'chunk table' of the audio file, an array
-       of offsets within the audio file, may be printed. This table
-       can be used by other programs unaware of the particular audio
-       format to stream the audio file.
-
-       - write selected parts of the given audio file in complete
-       chunks without decoding. Thus para_afh can be used to 'cut'
-       an audio file.
-
-       - write selected parts of the given audio files 'just in time'
-       to stdout. This may be useful for third-party software that
-       is capable of reading from stdin.
-"
-</qu>
-
-include(loglevel.m4)
-
-<qu>
-defgroup "mode"
-#--------------
-groupdesc="
-       There are two modes of operation: Info mode and stream mode,
-       one of which must be selected by the corresponding option.
-       See below.
-"
-required
-
-groupoption "info" i
-#~~~~~~~~~~~~~~~~~~~
-"select info mode"
-group="mode"
-details="
-       In this mode, the program prints technical information about
-       the given audio file to stdout.
-"
-
-groupoption "stream" s
-#~~~~~~~~~~~~~~~~~~~~~
-"select stream mode"
-group="mode"
-details="
-       If this mode is selected, the selected parts of the content
-       of the audio file are written to stdout. Only complete chunks
-       with respect of the underlying audio format are written.
-       For example, only complete frames in case of mp3 files.
-"
-
-section "Options for info mode"
-#==============================
-
-option "chunk_table" c
-#~~~~~~~~~~~~~~~~~~~~~
-"print also the chunk table"
-flag off
-dependon="info"
-
-option "human" u
-#~~~~~~~~~~~~~~~
-"use human-readable output format"
-flag off
-dependon = "info"
-details = "
-       Currently this option only affects the format of the chunk table,
-       so it has no effect if --chunk_table is not given.
-
-       The human-readable output consists of one output line per
-       chunk and the output contains also the chunk number, the
-       duration and the size of each chunk.
-"
-
-section "Options for stream mode"
-#================================
-
-
-option "begin_chunk" b
-#~~~~~~~~~~~~~~~~~~~~~
-"skip a number of chunks"
-int typestr="chunk_num"
-default="0"
-dependon="stream"
-optional
-details="
-       The chunk_num argument must be between -num_chunks and
-       num_chunks - 1 inclusively where num_chunks is the total number
-       of chunks which is printed when using the --info option. If
-       chunk_num is negative, the given number of chunks are counted
-       backwards from the end of the file. For example --begin_chunk
-       -100 instructs para_afh to start output at chunk num_chunks
-       - 100. This is mainly useful for cutting off the end of an
-       audio file.
-"
-
-option "end_chunk" e
-#~~~~~~~~~~~~~~~~~~~
-"only write up to chunk chunk_num"
-int typestr="chunk_num"
-dependon="stream"
-optional
-details="
-       For the chunk_num argument the same rules as for --begin_chunk
-       apply.  The default is to write up to the last chunk.
-"
-
-option "just_in_time" j
-#~~~~~~~~~~~~~~~~~~~~~~
-"use timed writes"
-flag off
-dependon="stream"
-details="
-       Write the specified chunks of data 'just in time', i.e. the
-       write of each chunk is delayed until the time it is needed
-       by the decoder/player in order to guarantee an uninterrupted
-       audio stream.
-"
-
-option "no_header" H
-#~~~~~~~~~~~~~~~~~~~
-"do not write an audio file header"
-flag off
-dependon="stream"
-details="
-       If an audio format needs information about the audio file
-       in a format-specific header in order to be understood by
-       the decoding software, a suitable header is automatically
-       send. This option changes the default behaviour, i.e. no
-       header is written.
-"
-</qu>
diff --git a/ggo/alsa_write.m4 b/ggo/alsa_write.m4
deleted file mode 100644 (file)
index d0cd407..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-include(header.m4)
-
-<qu>
-option "device" d
-#~~~~~~~~~~~~~~~~
-"set PCM device"
-string typestr="device"
-default="default"
-optional
-details="
-       On systems with dmix, a better choice than the default
-       value might be to use \"plug:swmix\".
-"
-</qu>
diff --git a/ggo/amp_filter.m4 b/ggo/amp_filter.m4
deleted file mode 100644 (file)
index 865df3a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-option "amp" a
-#~~~~~~~~~~~~~
-"amplification value"
-int typestr="number"
-default="32"
-optional
-details="
-       The amplification value determines the scaling factor by
-       which the amplitude of the audio stream is multiplied. The
-       formula for the scaling factor is
-
-               factor = 1 + amp / 64.
-
-       For example, an amplifiction value of zero results in a
-       scaling factor of one while an amplification value of 64
-       means to double the volume.
-"
diff --git a/ggo/ao_write.m4 b/ggo/ao_write.m4
deleted file mode 100644 (file)
index baccc57..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-include(header.m4)
-<qu>
-
-option "driver" d
-#~~~~~~~~~~~~~~~~
-"Select a output driver by name"
-string typestr = "name"
-optional
-details = "
-       If this is not given, the driver with the highest priority
-       (see below) will be used.
-"
-
-option "ao-option" o
-#~~~~~~~~~~~~~~~~~~~
-"Pass a key-value pair to the libao driver"
-string typestr = "key:value"
-optional
-multiple
-details = "
-       For each time this option is given, the supplied key-value
-       pair is appended to the list of options for the driver. Invalid
-       keys are silently ignored.
-"
-
-</qu>
diff --git a/ggo/audioc.m4 b/ggo/audioc.m4
deleted file mode 100644 (file)
index 5ecc2a9..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-include(header.m4)
-<qu>
-option "socket" s
-#~~~~~~~~~~~~~~~~
-"well-known socket (default=/var/paraslash/audiod.socket.$HOSTNAME)"
-       string typestr="filename"
-       optional
-
-
-option "bufsize" b
-#~~~~~~~~~~~~~~~~~
-"size of internal buffer"
-       int typestr="bytes"
-       default="8192"
-       optional
-</qu>
-
-define(CURRENT_PROGRAM,para_audioc)
-define(DEFAULT_HISTORY_FILE,~/.paraslash/audioc.history)
-include(loglevel.m4)
-include(history_file.m4)
-include(complete.m4)
diff --git a/ggo/audiod.m4 b/ggo/audiod.m4
deleted file mode 100644 (file)
index 9aabd57..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-include(header.m4)
-define(CURRENT_PROGRAM,para_audiod)
-define(DEFAULT_CONFIG_FILE,~/.paraslash/audiod.conf)
-
-<qu>
-#########################
-section "General options"
-#########################
-</qu>
-
-include(loglevel.m4)
-include(color.m4)
-include(config_file.m4)
-include(logfile.m4)
-include(log_timing.m4)
-include(daemon.m4)
-include(user.m4)
-include(group.m4)
-
-<qu>
-########################
-section "Audiod options"
-########################
-
-option "force" F
-#~~~~~~~~~~~~~~~
-"force startup"
-flag off
-details="
-       If this flag is not given, para_audiod refuses to start if the
-       well-known socket file (see the --socket option) already exists
-       because this usually means that para_audiod is already running
-       and listening on that socket. After a crash or if para_audiod
-       received a SIGKILL signal, a stale socket file might remain and
-       you have to use --force once to force startup of para_audiod.
-"
-
-option "mode" m
-#~~~~~~~~~~~~~~
-"startup mode"
-string typestr="mode"
-default="on"
-optional
-details="
-       Para_audiod supports three modes of operation: On, off and
-       standby (sb).  This option selects the mode that should be
-       used on startup. If para_audiod operates in \"on\" mode, it
-       will connect to para_server in order to receive its status
-       information. If para_server announces the availability of an
-       audio stream, para_audiod will automatically download, decode
-       and play the audio stream according to the given stream I/O
-       options, see below.
-
-       In \"standby\" mode, para_audiod will only receive the
-       status information from para_server but will not download
-       the audio stream.
-
-       In \"off\" mode, para_audiod does not connect para_server at
-       all, but still listens on the local socket for connections.
-"
-
-option "socket" s
-#~~~~~~~~~~~~~~~~
-"well-known socket"
-string typestr="filename"
-optional
-details="
-       Para_audiod uses a \"well-known\" socket to listen
-       on for connections from para_audioc. This socket is a
-       special file in the file system; its location defaults to
-       /var/paraslash/audiod_sock.<host_name>.
-
-       para_audioc, the client program used to connect to para_audiod,
-       opens this socket in order to talk to para_audiod.  If the
-       default value for para_audiod is changed, para_audioc must be
-       instructed to use also \"filename\" for connecting para_audiod.
-"
-
-option "user_allow" -
-#~~~~~~~~~~~~~~~~~~~~
-"allow this uid"
-int typestr="uid"
-default="-1"
-optional
-multiple
-details="
-       Allow the user identified by \"uid\" to connect to para_audiod.
-       May be specified multiple times. If not specified at all,
-       all users are allowed to connect.
-
-       This feature requires unix socket credentials and is currently
-       only supported on Linux systems. On other operating systems,
-       the option is silently ignored and all local users are allowed
-       to connect to para_audiod.
-"
-
-option "clock_diff_count" -
-#~~~~~~~~~~~~~~~~~~~~~~~~~~
-"sync clock on startup"
-int typestr="count"
-default="0"
-optional
-details="
-       Check the clock difference between the host running para_server
-       and the local host running para_audiod that many times before
-       starting any stream I/0. Set this to non-zero for non-local
-       setups if the clocks of these two hosts are not synchronized
-       by ntp or similar.
-"
-
-#############################
-section "Stream I/O options"
-#############################
-
-option "receiver" r
-#~~~~~~~~~~~~~~~~~~
-"select receiver"
-string typestr="receiver_spec"
-default="http"
-optional
-multiple
-details="
-       This option may be given multiple times, for each audio format
-       separately. If multiple definitions for an audio format are
-       given, the first one is selected.
-
-       The \"receiver_spec\" consists of an audio format specifier
-       and one or more receiver arguments, separated by a colon.
-
-       The audio format specifier is a regular expression which
-       specifies the set of audio formats for which this option
-       should apply.
-
-       If any receiver options are present, the whole receiver
-       argument must be quoted:
-
-               -r 'mp3:http -i my.host.org -p 8009'
-
-       Since a single dot '.' matches the name of any audio format,
-       specifying '.' instead of 'mp3' above activates the http
-       receiver for all audio formats.
-
-"
-
-option "filter" f
-#~~~~~~~~~~~~~~~~
-"Specify the filter configuration."
-string typestr = "filter_spec"
-optional
-multiple
-details = "
-       This option may be given multiple times. The \"filter_spec\"
-       consists of an audio format specifier (see above), the name
-       of the filter, and any options for that filter. Note that
-       order matters.
-
-       The compiled-in defaults apply to all audio formats for which
-       no --filter option was given. These defaults depend on the
-       receiver being used.
-
-       For HTTP streams, only the decoder for the current audio
-       format is activated. UDP and DCCP streams, on the other
-       hand, are sent FEC-encoded by para_server. In order to play
-       such streams, the receiver output must be FEC-decoded first,
-       i.e. fed to the fecdec filter. Therefore the default for UDP
-       and DCCP streams is to activate the fecdec filter, followed
-       by the decoding filter for the audio format.
-
-       Examples:
-
-               --filter 'mp3:mp3dec'
-
-               --filter 'mp3|aac:compress --inertia 5 --damp 2'
-
-               --filter '.:fecdec'
-
-"
-
-option "writer" w
-#~~~~~~~~~~~~~~~~
-"Specify stream writer."
-string typestr="writer_spec"
-optional
-multiple
-details="
-       May be given multiple times, even multiple times for the same
-       audio format.  Default value is \"alsa\" for all supported
-       audio formats. Example:
-
-               --writer 'aac|wma:oss'
-
-"
-
-option "stream_delay" -
-#~~~~~~~~~~~~~~~~~~~~~~
-"time for client sync"
-int typestr="milliseconds"
-default="200"
-optional
-details="
-       Add the given amount of milliseconds to the stream start time
-       announced by para_server and do not send data to the writer
-       before that time (modulo clock difference).
-
-       This is useful mainly for synchronizing the audio output of
-       different clients.
-"
-</qu>
diff --git a/ggo/client.m4 b/ggo/client.m4
deleted file mode 100644 (file)
index 8ade508..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-include(header.m4)
-define(CURRENT_PROGRAM,para_client)
-define(DEFAULT_CONFIG_FILE,~/.paraslash/client.conf)
-define(DEFAULT_HISTORY_FILE,~/.paraslash/client.history)
-<qu>
-args "--no-handle-error"
-option "hostname" i "ip or host to connect" string typestr="host" default="localhost" optional
-option "user" u "paraslash username" string typestr="username" default="<current user>" optional
-option "server_port" p "port to connect" int typestr="port" default="2990" optional
-option "key_file" k "(default='~/.paraslash/key.<user>')" string typestr="filename" optional
-</qu>
-
-include(loglevel.m4)
-include(config_file.m4)
-include(history_file.m4)
-include(complete.m4)
diff --git a/ggo/color.m4 b/ggo/color.m4
deleted file mode 100644 (file)
index 63e996f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<qu>
-
-option "color" C
-#~~~~~~~~~~~~~~~
-"activate color output"
-enum typestr="when"
-values = "yes","no","auto"
-default = "auto"
-optional
-
-option "log_color" -
-#~~~~~~~~~~~~~~~~~~~
-"select a color for one type of log message"
-string typestr="color_spec"
-multiple
-optional
-details="
-       The format of \"color_spec\" is [fg [bg]] [attr].
-
-       Valid colors for \"fg\" and \"bg\" are \"normal\", \"black\",
-       \"red\", \"green\", \"yellow\", \"blue\", \"magenta\",
-       \"cyan\", and \"white\".
-
-       The \"attr\" value must be one of \"bold\", \"dim\", \"ul\",
-       \"blink\", \"reverse\".
-
-       Examples:
-
-               --log_color \"debug:green\"
-               --log_color \"info:yellow bold\"
-               --log_color \"notice:white red bold\"
-"
-
-</qu>
diff --git a/ggo/complete.m4 b/ggo/complete.m4
deleted file mode 100644 (file)
index 14e737c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<qu>
-option "complete" -
-#~~~~~~~~~~~~~~~~~~
-"print possible command line completions"
-       flag off
-       details = "
-       If this flag is given, </qu>CURRENT_PROGRAM<qu> reads the environment
-       variables COMP_LINE and COMP_POINT to obtain the current command line
-       and the cursor position respectively, prints possible completions
-       to stdout and exits.
-"
-</qu>
diff --git a/ggo/compress_filter.m4 b/ggo/compress_filter.m4
deleted file mode 100644 (file)
index 74dcbc0..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-option "blocksize" b
-#~~~~~~~~~~~~~~~~~~~
-"adjust block size"
-int typestr="number"
-default="15"
-optional
-details = "
-       Larger blocksize means fewer volume adjustments per time unit.
-"
-
-option "aggressiveness" a
-#~~~~~~~~~~~~~~~~~~~~~~~~
- "controls the maximum amount to amplify by"
-int typestr="number"
-default="4"
-optional
-
-option "inertia" i
-#~~~~~~~~~~~~~~~~~
- "how much inertia ramping has"
- int typestr="number"
-default="6"
-optional
-
-option "target_level" t
-#~~~~~~~~~~~~~~~~~~~~~~
-"target signal level (0-32768)"
-int typestr="number"
-default="20000"
-optional
-
-option "damp" d
-#~~~~~~~~~~~~~~
-"if non-zero, scale down after normalizing"
-int typestr="number"
-default="0"
-optional
diff --git a/ggo/config_file.m4 b/ggo/config_file.m4
deleted file mode 100644 (file)
index 318ba7a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<qu>
-option "config_file" c
-#~~~~~~~~~~~~~~~~~~~~~
-"(default='</qu>DEFAULT_CONFIG_FILE<qu>')"
-string typestr="filename"
-optional
-details="
-       </qu>CURRENT_PROGRAM<qu> reads its config file right after parsing
-       the options that were given at the command line. If an
-       option is given both at the command line and in the
-       config file, the value that was specified at the command line
-       takes precedence.
-"
-</qu>
diff --git a/ggo/daemon.m4 b/ggo/daemon.m4
deleted file mode 100644 (file)
index b4e842a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<qu>
-option "daemon" d
-#~~~~~~~~~~~~~~~~
-"run as background daemon"
-flag off
-dependon="logfile"
-details="
-       Note that </qu>CURRENT_PROGRAM<qu> refuses to start in daemon mode if no
-       logfile was specified.
-"
-</qu>
diff --git a/ggo/dccp_recv.m4 b/ggo/dccp_recv.m4
deleted file mode 100644 (file)
index 80d3123..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-option "host" i
-"ip or host"
-string default="localhost"
-optional
-details="
-       Both IPv4 and IPv6 addresses are supported.
-"
-
-option "port" p
-"port to connect to"
-int
-default="8000"
-optional
-
-option "ccid" c
-"CCID preference(s) for this connection"
-int
-# restrict the maximum number of times this option can be passed
-optional multiple(-10)
-# currently known CCIDs:
-# - CCID-2 (RFC 4341),
-# - CCID-3 (RFC 4342),
-# - CCID-4 (RFC 5622),
-# - CCID-248 ... CCID-254 are experimental (RFC 4340, 19.5)
-values="2", "3", "4", "248", "249", "250", "251", "252", "253", "254"
-details="
-       When present exactly once, this option mandates the CCID for the
-       sender-receiver connection. If it is passed more than once, it sets
-       a preference list where the order of appearance signifies descending
-       priority. For example, passing 4, 2, 3 creates the preference list
-       (CCID-4, CCID-2, CCID-3), assigning CCID-4 highest preference.
-
-       The request is reconciled with the CCIDs on the server through the
-       'server-priority' mechanism of RFC 4340 6.3.1/10. The server CCIDs
-       can be listed by calling 'para_client si'.
-
-"
diff --git a/ggo/fade.m4 b/ggo/fade.m4
deleted file mode 100644 (file)
index 80f8b73..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-section "General options"
-#########################
-
-option "mode" o
-#~~~~~~~~~~~~~~
-"how to fade volume"
-       enum typestr = "mode"
-       values = "sleep", "snooze", "fade"
-       default = "sleep"
-       optional
-       details="
-               para_fade knows three different fading modes:
-
-               sleep mode: Change to the initial volume and select
-               the initial afs mood/playlist. Then fade out until
-               the fade-out volume is reached. Switch to the
-               sleep mood/playlist until wake time minus fade-in
-               time. Finally switch to the wake mood/playlist and
-               fade to the fade-in volume.
-
-               fade: Fade the volume to the given value in the
-               given time.
-
-               snooze: Fade out, sleep a bit and fade in.
-"
-
-option "config-file" c
-#~~~~~~~~~~~~~~~~~~~~~
-"(default='~/.paraslash/fade.conf')"
-       string typestr = "filename"
-       optional
-
-option "mixer-device" m
-#~~~~~~~~~~~~~~~~~~~~~~
-"mixer device file"
-       string typestr = "device"
-       default = "/dev/mixer"
-       optional
-
-option "mixer-channel" C
-#~~~~~~~~~~~~~~~~~~~~~~~
-"select the analog mixer channel"
-       enum typestr = "channel"
-       values = "volume", "bass", "treble", "synth", "pcm", "speaker", "line",
-               "mic", "cd", "imix", "altpcm", "reclev", "igain", "ogain"
-       default = "volume"
-       optional
-       details = "
-               Not all listed channels might be supported on any
-               particular hardware.
-"
-
-section "Options for sleep mode"
-################################
-
-option "ivol" -
-#~~~~~~~~~~~~~~
-"set initial volume"
-       int typestr = "volume"
-       default = "60"
-       optional
-       details = "
-               Used as the start volume, before fading out to the
-               fade out volume.
-       "
-
-option "fo-mood" -
-#~~~~~~~~~~~~~~~~~
-"afs mood/playlist during fade out"
-       string typestr = "mood_spec"
-       default = "m/fade"
-       optional
-       details = "
-               Select this mood right after setting the
-               volume. Example: --fo-mood m/sleep
-"
-
-option "fo-time" -
-#~~~~~~~~~~~~~~~~~
-"fall asleep fade out time"
-       int typestr = "seconds"
-       default = "1800"
-       optional
-       details = "
-               No fading if set to 0.
-       "
-
-option "fo-vol" -
-#~~~~~~~~~~~~~~~~
-"volume to fade out to"
-       int typestr = "volume"
-       default = "20"
-       optional
-
-option "sleep-mood" -
-#~~~~~~~~~~~~~~~~~~~~
-"sleep time afs mood/playlist"
-       string typestr = "mood_spec"
-       default = "m/sleep"
-       optional
-       details = "
-               Select the given afs mood/playlist after the fade
-               out is complete. If unset, the \"stop\" command is
-               sent to para_server.
-       "
-
-option "wake-hour" H
-#~~~~~~~~~~~~~~~~~~~
-"(0-23) (default: now + 9 hours)"
-       int typestr = "hour"
-       optional
-
-option "wake-min" M
-#~~~~~~~~~~~~~~~~~~
-"(0-59)"
-       int typestr = "minutes"
-       default = "0"
-       optional
-
-option "fi-mood" -
-#~~~~~~~~~~~~~~~~~
-"afs mood/playlist during fade in"
-       string typestr = "mood_spec"
-       default = "m/wake"
-       optional
-       details = "
-               Change to this afs mood/playlist on wake time.
-       "
-
-option "fi-time" -
-#~~~~~~~~~~~~~~~~~
-"wake up fade in time"
-       int typestr="seconds"
-       default="1200"
-       optional
-       details = "
-               No fading in if set to 0.
-       "
-
-option "fi-vol" -
-#~~~~~~~~~~~~~~~~
-"volume to fade to at wake time"
-       int typestr = "volume"
-       default = "80"
-       optional
-
-section "Options for snooze mode"
-#################################
-
-option "so-time" -
-#~~~~~~~~~~~~~~~~~
-"snooze-out time"
-       int typestr = "seconds"
-       default = "30"
-       optional
-
-option "so-vol" -
-#~~~~~~~~~~~~~~~~
-"volume to fade to before snooze"
-       int typestr = "volume"
-       default = "20"
-       optional
-
-option "snooze-time" -
-#~~~~~~~~~~~~~~~~~~~~~
-"delay"
-       int typestr = "seconds"
-       default = "600"
-       optional
-
-option "si-time" -
-#~~~~~~~~~~~~~~~~~
-"snooze-in time"
-       int typestr = "seconds"
-       default = "180"
-       optional
-
-option "si-vol" -
-#~~~~~~~~~~~~~~~~
-"volume to fade to after snooze"
-       int typestr = "volume"
-       default = "80"
-       optional
-
-section "Options for fade mode"
-###############################
-
-option "fade-vol" f
-#~~~~~~~~~~~~~~~~~~
-"volume to fade to"
-       int typestr = "volume"
-       default = "50"
-       optional
-
-option "fade-time" t
-#~~~~~~~~~~~~~~~~~~~
-"fading time"
-       int typestr = "seconds"
-       default = "5"
-       optional
diff --git a/ggo/file_write.m4 b/ggo/file_write.m4
deleted file mode 100644 (file)
index 56c44f7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-option "filename" f
-#~~~~~~~~~~~~~~~~~~
-"specify output file name"
-string typestr="filename"
-optional
-details="
-       Defaults to a random filename in ~/.paraslash.
-"
-
diff --git a/ggo/filter.m4 b/ggo/filter.m4
deleted file mode 100644 (file)
index 9df0f3f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-include(header.m4)
-include(loglevel.m4)
-<qu>
-option "filter" f
-#~~~~~~~~~~~~~~~~
-"Specify filter."
-string typestr="filter_spec"
-optional
-multiple
-details="
-       May be given multiple times to 'pipe' the stream through
-       arbitrary many filters (without copying the data). The same
-       filter may appear more than once, order matters.
-
-       Options for a particular filter may be specified for each
-       given '--filter' option separately. You will have to quote
-       these options like this:
-
-               --filter 'compress --inertia 5 --damp 2'
-"
-</qu>
diff --git a/ggo/fsck.m4 b/ggo/fsck.m4
deleted file mode 100644 (file)
index d593058..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-include(header.m4)
-include(loglevel.m4)
-
-<qu>
-option "base_dir" b
-#~~~~~~~~~~~~~~~~~~
-"Full path to the database directory
-containing the table(s) to be checked.
-(default='~/.paraslash/afs_database'"
-
-       string typestr="path"
-       optional
-
-option "dump_dir" d
-#~~~~~~~~~~~~~~~~~~
-"If path is non-empty, para_fsck will write a
-dump of all given tables to the specified
-path."
-
-       string typestr="path"
-       optional
-       default=""
-
-option "no_fsck" n
-#~~~~~~~~~~~~~~~~~
-"Disable fsck mode."
-
-       flag off
-
-option "force" f
-#~~~~~~~~~~~~~~~
-"Force fsck even if the table is dirty.
-Ignored if -n is given."
-
-       flag off
-
-option "dry_run" -
-#~~~~~~~~~~~~~~~~~
-"Only report problems, don't try to fix them."
-
-       flag off
-
-</qu>
diff --git a/ggo/group.m4 b/ggo/group.m4
deleted file mode 100644 (file)
index 2a59ad9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-option "group" g
-#~~~~~~~~~~~~~~~
-"set group id"
-string typestr="group"
-optional
-details="
-       This option sets the group id according to 'group'. This option
-       is silently ignored if EUID != 0. Otherwise, real/effective
-       GID and the saved set-group ID are all set to the GID given by
-       'group'. Must not be given in the config file.
-"
-
diff --git a/ggo/gui.m4 b/ggo/gui.m4
deleted file mode 100644 (file)
index 895229b..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-include(header.m4)
-define(CURRENT_PROGRAM,para_gui)
-define(DEFAULT_CONFIG_FILE,~/.paraslash/gui.conf)
-
-<qu>
-#########################
-section "General options"
-#########################
-</qu>
-
-include(config_file.m4)
-include(loglevel.m4)
-
-<qu>
-option "timeout" t
-#~~~~~~~~~~~~~~~~~
-"set timeout"
-int typestr = "milliseconds"
-default = "30"
-optional
-
-option "theme" T
-#~~~~~~~~~~~~~~~
-"select startup theme"
-string typestr = "name"
-optional
-details = "
-       If this option is not given the default theme is used.
-       If the given name is not a valid theme name, the list of
-       available themes is printed and the program terminates.
-"
-
-option "stat_cmd" s
-#~~~~~~~~~~~~~~~~~~
-"command to read status items from"
-string typestr = "command"
-default = "para_audioc -- stat -p"
-optional
-details = "
-       In order to run para_gui on a host on which no para_audiod
-       is running (hence the default command does not work), the
-       command
-
-               para_client -- stat -p
-
-       may be used. This command prints less information though.
-       In particular, no timing information about the current audio
-       file is printed.
-"
-
-#---------------------------------
-section "Mapping keys to commands"
-#---------------------------------
-
-option "key_map" k
-#~~~~~~~~~~~~~~~~~
-"Map key k to command c using mode m."
-
-string typestr = "k:m:c"
-optional
-multiple
-details = "
-       Mode may be d, x or p for display, external and paraslash
-       commands, respectively. Of course, this option may be given
-       multiple times, one for each key mapping.
-"
-</qu>
diff --git a/ggo/header.m4 b/ggo/header.m4
deleted file mode 100644 (file)
index c423187..0000000
+++ /dev/null
@@ -1 +0,0 @@
-changequote(<qu>,</qu>)
diff --git a/ggo/history_file.m4 b/ggo/history_file.m4
deleted file mode 100644 (file)
index 932d88b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<qu>
-option "history_file" -
-#~~~~~~~~~~~~~~~~~~~~~~
-"(default='</qu>DEFAULT_HISTORY_FILE<qu>')"
-string typestr = "filename"
-optional
-details = "
-       If </qu>CURRENT_PROGRAM<qu> runs in interactive mode, it reads the history
-       file on startup. Upon exit, the in-memory history is appended
-       to the history file.
-"
-</qu>
diff --git a/ggo/http_recv.m4 b/ggo/http_recv.m4
deleted file mode 100644 (file)
index 14ae99a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-include(header.m4)
-
-<qu>
-option "host" i
-#~~~~~~~~~~~~~~
-"ip or host"
-string
-default="localhost"
-optional
-details="
-       Both IPv4 and IPv6 addresses are supported.
-"
-
-option "port" p
-#~~~~~~~~~~~~~~
-"tcp port to connect to"
-int default="8000"
-optional
-</qu>
diff --git a/ggo/log_timing.m4 b/ggo/log_timing.m4
deleted file mode 100644 (file)
index ac0ea84..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<qu>
-option "log-timing" T
-#~~~~~~~~~~~~~~~~~~~~
-"show milliseconds in log messages"
-flag off
-details = "
-       Selecting this option causes milliseconds to be included in
-       the log message output. This allows to measure the interval
-       between log messages in milliseconds which is useful for
-       identifying timing problems.
-"
-</qu>
diff --git a/ggo/logfile.m4 b/ggo/logfile.m4
deleted file mode 100644 (file)
index bb10293..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<qu>
-option "logfile" L
-#~~~~~~~~~~~~~~~~~
-"where to write log output"
-string typestr="filename"
-optional
-details="
-       If this option is not given, </qu>CURRENT_PROGRAM<qu> writes the log
-       messages to to stderr
-"
-</qu>
diff --git a/ggo/loglevel.m4 b/ggo/loglevel.m4
deleted file mode 100644 (file)
index 162d030..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<qu>
-option "loglevel" l
-#~~~~~~~~~~~~~~~~~~
-"set loglevel"
-string typestr="level"
-values = "debug","info","notice","warning","error","crit","emerg"
-default="warning"
-optional
-details="
-       Log only messages with severity greater or equal the given
-       value.
-
-       debug: Produces really noisy output.
-       info: Still noisy, but won't fill up the disk quickly.
-       notice: Indicates normal, but significant event.
-       warning: Unexpected events that can be handled.
-       error: Unhandled error condition.
-       crit: System might be unreliable.
-       emerg: Last message before exit.
-"
-
-</qu>
diff --git a/ggo/makefile b/ggo/makefile
deleted file mode 100644 (file)
index 4bc29a0..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-module_ggo_opts := --set-version="($(PACKAGE_STRING), $(codename))"
-$(cmdline_dir):
-       mkdir -p $(cmdline_dir)
-
-$(cmdline_dir)/%_recv.cmdline.h $(cmdline_dir)/%_recv.cmdline.c: $(ggo_dir)/%_recv.ggo | $(cmdline_dir)
-       @[ -z "$(Q)" ] || echo 'GGO $<'
-       $(Q) $(GENGETOPT) $(module_ggo_opts) \
-               --output-dir=$(cmdline_dir) \
-               --set-package=$(subst .ggo,,$(<F)) \
-               --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
-               --file-name=$(subst .ggo,,$(<F)).cmdline \
-               --func-name $(subst .ggo,,$(<F))_cmdline_parser < $<
-
-$(cmdline_dir)/%_filter.cmdline.h $(cmdline_dir)/%_filter.cmdline.c: $(ggo_dir)/%_filter.ggo | $(cmdline_dir)
-       @[ -z "$(Q)" ] || echo 'GGO $<'
-       $(Q) $(GENGETOPT) $(module_ggo_opts) \
-               --output-dir=$(cmdline_dir) \
-               --set-package=$(subst .ggo,,$(<F)) \
-               --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
-               --file-name=$(subst .ggo,,$(<F)).cmdline \
-               --func-name=$(subst _filter.ggo,,$(<F))_cmdline_parser < $<
-$(cmdline_dir)/%_write.cmdline.h $(cmdline_dir)/%_write.cmdline.c: $(ggo_dir)/%_write.ggo | $(cmdline_dir)
-       @[ -z "$(Q)" ] || echo 'GGO $<'
-       $(Q) $(GENGETOPT) -S $(module_ggo_opts) \
-               --output-dir=$(cmdline_dir) \
-               --set-package=$(subst .ggo,,$(<F)) \
-               --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
-               --file-name=$(subst .ggo,,$(<F)).cmdline \
-               --func-name $(subst _write.ggo,,$(<F))_cmdline_parser < $<
-
-define ggo-opts
-$(if $(filter gui,$(*F)), --no-handle-error) \
-$(if $(filter recv filter write audiod,$(*F)), --no-handle-help) \
-$(if $(filter afh,$(*F)), --unamed-opts=audio_file) \
-$(if $(filter client audioc,$(*F)), --unamed-opts=command) \
-$(if $(filter fsck,$(*F)), --unamed-opts=table, --conf-parser)\
---output-dir=$(cmdline_dir) \
---no-handle-version \
---file-name=$(*F).cmdline \
---func-name=$(*F)_cmdline_parser \
---arg-struct-name=$(*F)_args_info \
---set-package="para_$(*F)" \
---set-version="$(PACKAGE_VERSION)"
-endef
-
-$(cmdline_dir)/%.cmdline.h $(cmdline_dir)/%.cmdline.c: $(ggo_dir)/%.ggo | $(cmdline_dir)
-       @[ -z "$(Q)" ] || echo 'GGO $<'
-       $(Q) $(GENGETOPT) $(ggo-opts) < $<
-
-$(ggo_dir)/server.ggo $(ggo_dir)/audiod.ggo: \
-       $(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/color.m4 \
-       $(m4_ggo_dir)/config_file.m4 $(m4_ggo_dir)/logfile.m4 \
-       $(m4_ggo_dir)/daemon.m4 $(m4_ggo_dir)/user.m4 \
-       $(m4_ggo_dir)/group.m4 $(m4_ggo_dir)/log_timing.m4 \
-       $(m4_ggo_dir)/config_file.m4
-
-$(ggo_dir)/afh.ggo: $(m4_ggo_dir)/loglevel.m4
-$(ggo_dir)/audioc.ggo: \
-       $(m4_ggo_dir)/loglevel.m4 \
-       $(m4_ggo_dir)/history_file.m4 \
-       $(m4_ggo_dir)/complete.m4
-$(ggo_dir)/filter.ggo: $(m4_ggo_dir)/loglevel.m4
-$(ggo_dir)/fsck.ggo: $(m4_ggo_dir)/loglevel.m4
-$(ggo_dir)/gui.ggo: $(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/config_file.m4
-$(ggo_dir)/recv.ggo: $(m4_ggo_dir)/loglevel.m4
-$(ggo_dir)/write.ggo: $(m4_ggo_dir)/loglevel.m4
-$(ggo_dir)/client.ggo: \
-       $(m4_ggo_dir)/loglevel.m4 \
-       $(m4_ggo_dir)/config_file.m4 \
-       $(m4_ggo_dir)/history_file.m4 \
-       $(m4_ggo_dir)/complete.m4
-
-$(ggo_dir)/%.ggo: $(m4_ggo_dir)/%.m4 $(m4_ggo_dir)/header.m4
-       @[ -z "$(Q)" ] || echo 'M4 $<'
-       $(Q) cd $(ggo_dir); m4 $(<F) > $(@F)
diff --git a/ggo/mp3dec_filter.m4 b/ggo/mp3dec_filter.m4
deleted file mode 100644 (file)
index c02f158..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-include(header.m4)
-
-<qu>
-option "ignore-crc" i
-#~~~~~~~~~~~~~~~~~~~~
-"ignore CRC information in the audio stream."
-flag off
-details="
-       This causes frames with CRC errors to be decoded and played
-       anyway. This option is not recommended, but since some encoders
-       have been known to generate bad CRC information, this option
-       is a work-around to play streams from such encoders.
-"
-</qu>
diff --git a/ggo/oss_write.m4 b/ggo/oss_write.m4
deleted file mode 100644 (file)
index 351561c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-option "device" d
-#~~~~~~~~~~~~~~~~
-"set PCM device"
-string typestr="device"
-default="/dev/dsp"
-optional
-details = ""
diff --git a/ggo/osx_write.m4 b/ggo/osx_write.m4
deleted file mode 100644 (file)
index bee16d9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-section "osx options"
-#####################
-
-option "numbuffers" n
-#~~~~~~~~~~~~~~~~~~~~~
-
-"number of audio buffers to allocate (increase if
-you get buffer underruns)"
-
-       int typestr="num"
-       default="20"
-       optional
-       details = ""
diff --git a/ggo/prebuffer_filter.m4 b/ggo/prebuffer_filter.m4
deleted file mode 100644 (file)
index 7553e95..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-option "duration" d
-#~~~~~~~~~~~~~~~~~~
-"prebuffer time"
-int typestr="milliseconds"
-default="200"
-optional
-details="
-       Wait that many milliseconds before letting data go through.
-       The time interval starts when the first data byte is seen by
-       this filter.
-"
-
-option "size" s
-#~~~~~~~~~~~~~~
-"amount of data to prebuffer"
-int typestr="bytes"
-default="0"
-optional
-details="
-       Wait until that many data bytes are available in the input buffer.
-       The default value of zero means to not prebuffer by size at all.
-       If both --duration and --size options are given and non-zero, the
-       filter waits until both conditions are met.
-"
diff --git a/ggo/recv.m4 b/ggo/recv.m4
deleted file mode 100644 (file)
index 9702e12..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-include(header.m4)
-include(loglevel.m4)
-
-<qu>
-option "receiver" r
-"Select receiver"
-string typestr="receiver_spec"
-default="http"
-optional
-details="
-       Any options for the selected receiver must
-       be quoted. Example:
-
-               -r 'http -i www.paraslash.org -p 8009'
-"
-</qu>
diff --git a/ggo/server.m4 b/ggo/server.m4
deleted file mode 100644 (file)
index 8731561..0000000
+++ /dev/null
@@ -1,374 +0,0 @@
-include(header.m4)
-define(CURRENT_PROGRAM,para_server)
-define(DEFAULT_CONFIG_FILE,~/.paraslash/server.conf)
-
-<qu>
-#########################
-section "General options"
-#########################
-</qu>
-
-include(loglevel.m4)
-include(log_timing.m4)
-include(color.m4)
-include(daemon.m4)
-include(user.m4)
-include(group.m4)
-
-<qu>
-option "port" p
-#~~~~~~~~~~~~~~
-"listening port"
-int typestr="portnumber"
-default="2990"
-optional
-details="
-       para_server listens on this tcp port for incoming connections
-       from clients such as para_client. If the default port is
-       changed, the corresponding option of para_client must be used
-       to connect to para_server.
-"
-
-#############################
-section "Configuration files"
-#############################
-</qu>
-
-include(logfile.m4)
-include(config_file.m4)
-
-<qu>
-option "user_list" -
-#~~~~~~~~~~~~~~~~~~~
-"(default='~/.paraslash/server.users')"
-
-string typestr="filename"
-optional
-
-
-##################################
-section "virtual streaming system"
-##################################
-
-
-option "autoplay" a
-#~~~~~~~~~~~~~~~~~~
-"start playing on startup"
-flag off
-
-option "autoplay_delay" -
-#~~~~~~~~~~~~~~~~~~~~~~~~
-"time to wait before streaming"
-int typestr="ms"
-default="0"
-optional
-dependon="autoplay"
-details="
-       If para_server is started with the autoplay option, this option
-       may be used to set up a delay before para_server streams its
-       first audio file. This is useful for example if para_server
-       and para_audiod are started during system startup. The delay
-       time should be choosen large enough so that para_audiod is
-       already up when para_server starts to stream. Of course, this
-       option depends on the autoplay option.
-"
-option "announce_time" A
-#~~~~~~~~~~~~~~~~~~~~~~~
-"grace time for clients"
-
-int typestr="ms"
-default="300"
-optional
-details="
-       Clients such as para_audiod connect to para_server and execute
-       the stat command to find out whether an audio stream is
-       currently available. This sets the delay betweeen announcing
-       the stream via the output of the stat command and sending
-       the first chunk of data.
-"
-
-#############################
-section "audio file selector"
-#############################
-
-option "afs_database_dir" D
-#~~~~~~~~~~~~~~~~~~~~~~~~~~
-"location of the database"
-string typestr="path"
-optional
-details="
-       Where para_server should look for the osl database of the audio
-       file selector. The default is '~/.paraslash/afs_database-0.4'.
-"
-
-option "afs_socket" s
-#~~~~~~~~~~~~~~~~~~~~
-"Command socket for afs"
-string typestr="path"
-default="/var/paraslash/afs_command_socket-0.4"
-optional
-details="
-       For each server command that is handled by the audio file
-       selector, the child process of para_server connects to the
-       audio file selector via a local socket. This option specifies
-       the location of that socket in the file system.
-"
-option "afs_initial_mode" i
-#~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-"Mood or playlist to load on startup."
-string typestr="<specifier>/<name>"
-optional
-
-details="
-       The argument of this option must be prefixed with either 'p/'
-       or 'm/' to indicate whether a playlist or a mood should be
-       loaded. Example:
-               --afs_initial_mode p/foo
-       loads the playlist named 'foo'.
-"
-
-#####################
-section "http sender"
-#####################
-
-
-option "http_port" -
-#~~~~~~~~~~~~~~~~~~~
-"tcp port for http streaming"
-int typestr="portnumber"
-default="8000"
-optional
-details="
-       The http sender of para_server listens on this port for
-       incoming connections. Clients are expected to send the usual
-       http request message such as 'GET / HTTP/'.
-"
-
-option "http_default_deny" -
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"make the http ACL a whitelist"
-flag off
-details="
-       The default is to use blacklists instead, i.e. connections
-       to the http sender are allowed unless the connecting host
-       matches a pattern given by a http_access option. This allows
-       to use access control the other way round: Connections are
-       denied from hosts which are not explicitly allowed by one or
-       more http_access options.
-"
-
-option "http_access" -
-#~~~~~~~~~~~~~~~~~~~~~
-"add an entry to the http ACL"
-string typestr="a.b.c.d/n"
-optional
-multiple
-details="
-       Add given host/network to access control list (whitelist if
-       http_default_deny was given, blacklist otherwise) before
-       opening the tcp port. This option can be given multiple
-       times. Example: '192.168.0.0/24' whitelists/blacklists the
-       256 hosts 192.168.0.x
-"
-
-option "http_no_autostart" -
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"do not open tcp port on startup"
-flag off
-details="
-       If this option is given, the http sender does not listen on
-       its tcp port. It may be instructed to open this port at a
-       later time by using the sender command.
-"
-
-option "http_max_clients" -
-#~~~~~~~~~~~~~~~~~~~~~~~~~~
-"maximal number of connections"
-int typestr="number"
-default="-1"
-optional
-details="
-       The http sender will refuse connections if already that number
-       of clients are currently connected. A non-positive value
-       (the default) allows an unlimited number of simultaneous
-       connections.
-"
-
-#####################
-section "dccp sender"
-#####################
-
-
-option "dccp_port" -
-#~~~~~~~~~~~~~~~~~~~
-"port for dccp streaming"
-int typestr="portnumber"
-default="8000"
-optional
-details="
-       See http_port for details.
-"
-
-option "dccp_default_deny" -
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"make the dccp ACL a whitelist"
-flag off
-details="
-       See http_default_deny for details.
-"
-
-option "dccp_access" -
-#~~~~~~~~~~~~~~~~~~~~~
-"add an entry to the dccp ACL"
-string typestr="a.b.c.d/n"
-optional
-multiple
-details="
-       See http_access for details.
-"
-
-option "dccp_max_clients" -
-#~~~~~~~~~~~~~~~~~~~~~~~~~~
-"maximal number of connections"
-int typestr="number"
-default="-1"
-optional
-details="
-       See http_max_clients for details.
-"
-
-option "dccp_max_slice_size" -
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"Upper bound for the FEC slice size"
-int typestr = "size"
-optional
-default = "0"
-details = "
-       If this value is non-positive (the default) the dccp sender
-       uses the maximum packet size (MPS) of the connection as the
-       slice size. The MPS is a network parameter and depends on
-       the path maximum transmission unit (path MTU) of an incoming
-       connection, i.e. on the largest packet size that can be
-       transmitted without causing fragmentation.
-
-       This option allows to use a value less than the MPS in order
-       to fine-tune application performance. Values greater than
-       the MPS of an incoming connection can not be set.
-"
-
-option "dccp_data_slices_per_group" -
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"The number of non-redundant slices per FEC group"
-int typestr = "num"
-optional
-default = "3"
-details = "
-       This determines the number of slices in each FEC group that are
-       necessary to decode the group. The given number must be smaller
-       than the value of the dccp_slices_per_group option below.
-
-       Note that the duration of a FEC group is proportional to the
-       product dccp_max_slice_size * dccp_data_slices_per_group.
-"
-
-option "dccp_slices_per_group" -
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"The total number of slices per FEC group"
-int typestr = "num"
-optional
-default = "4"
-details = "
-       This value must be larger than the value given for above
-       dccp_data_slices_per_group above. The difference being the
-       number of redundant slices per group, i.e.  the number of
-       data packets that may be lost without causing interruptions
-       of the resulting audio stream.
-
-       Increase this value if for lossy networks.
-"
-
-####################
-section "udp sender"
-####################
-
-option "udp_target" -
-#~~~~~~~~~~~~~~~~~~~~
-"add udp target with optional port"
-string typestr="host[:port]"
-optional
-multiple
-details="
-       Add given host/port to the list of targets. The 'host' argument
-       can be either an IPv4/v6 address or hostname (RFC 3986 syntax).
-       The 'port' argument is an optional port number. If the 'port'
-       part is absent, the 'udp_default_port' value is used.
-
-       The following examples are possible targets:
-       '10.10.1.2:8000' (host:port); '10.10.1.2' (with default port);
-       '224.0.1.38:1500' (IPv4 multicast); 'localhost:8001' (hostname
-       with port); '[::1]:8001' (IPv6 localhost); '[badc0de::1]' (IPv6
-       host with default port); '[FF00::beef]:1500' (IPv6 multicast).
-
-       This option can be given multiple times, for multiple targets.
-"
-
-option "udp_no_autostart" -
-#~~~~~~~~~~~~~~~~~~~~~~~~~~
-"do not start sending"
-flag off
-details="
-       If this option is given, udp streaming may be activated at
-       a later time by using the sender command.
-"
-
-option "udp_default_port" -
-#~~~~~~~~~~~~~~~~~~~~~~~~~~
-"udp port to send to"
-int typestr="port"
-default="8000"
-optional
-
-option "udp_mcast_iface" -
-#~~~~~~~~~~~~~~~~~~~~~~~~~~
-"outgoing udp multicast interface"
-string
-optional
-
-option "udp_header_interval" H
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"duration for sending header"
-int typestr="ms"
-default="2000"
-optional
-details="
-       As the udp sender has no idea about connected clients it
-       sends the audio file header periodically if necessary. This
-       option is used to specify the duration of the interval between
-       sending the header. Shorter values decrease the average time
-       clients have to wait before being able to start playback,
-       but this also increases the amount network traffic. Note
-       that this affects only ogg vorbis streams as this is the only
-       audio format that needs an audio file header.
-"
-
-option "udp_ttl" t
-#~~~~~~~~~~~~~~~~~
-"set time to live value"
-int typestr="num"
-default="-1"
-optional
-details="
-       This option applies exclusively to multicast UDPv4/v6 streaming.
-
-       For the sending UDPv4 socket it sets the multicast Time-To-Live
-       value to \"num\".  Traditional TTL scope values are: 0=host,
-       1=network, 32=same site, 64=same region, 128=same continent,
-       255=unrestricted. Please note however that this scoping is not
-       a good solution: RFC 2365 e.g. presents a better alternative.
-
-       When using UDPv6 multicasting, the option sets the number of
-       multicast hops (as described in RFC 3493); a value of -1
-       allows the kernel to auto-select the hop value.
-"
-</qu>
diff --git a/ggo/udp_recv.m4 b/ggo/udp_recv.m4
deleted file mode 100644 (file)
index 4c37eac..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-option "host" i
-"ip or host to receive udp packets from"
-string default="224.0.1.38"
-optional
-details="
-       The default address resolves to DANTZ.MCAST.NET and activates
-       multicast.
-"
-
-option "port" p "udp port"
-int typestr="portnumber"
-default="8000"
-optional
-
-option "iface" I "receiving udp multicast interface"
-string
-optional
diff --git a/ggo/user.m4 b/ggo/user.m4
deleted file mode 100644 (file)
index 1bd5c59..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<qu>
-option "user" u
-#~~~~~~~~~~~~~~
-"run as the given user"
-string typestr="name"
-optional
-details="
-       </qu>CURRENT_PROGRAM<qu> does not need any special privileges.
-
-       If started as root (EUID == 0) this option must
-       be given at the command line (not in the configuration
-       file) so that </qu>CURRENT_PROGRAM<qu> can drop the root
-       privileges right after parsing the command line options,
-       but before parsing the configuration file. In this case,
-       real/effective/saved UID are all set to the UID of 'name'. As
-       the configuration file is read afterwards, those options that
-       have a default value depending on the UID (e.g. the directory
-       for the configuration file) are computed by using the uid of
-       'name'. This option has no effect if </qu>CURRENT_PROGRAM<qu>
-       is started as a non-root user (i.e.  EUID != 0).
-" </qu>
diff --git a/ggo/write.m4 b/ggo/write.m4
deleted file mode 100644 (file)
index 524d724..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-include(header.m4)
-include(loglevel.m4)
-
-option "writer" w
-#~~~~~~~~~~~~~~~~
-"select stream writer"
-string typestr="name"
-default="alsa (file if alsa is unsupported)"
-optional
-multiple
-details="
-       May be give multiple times. The same writer may be specified
-       more than once.
-"
-
-text "
-       The following options are only necessary for raw audio. When
-       playing wav files this information is obtained from the
-       wave header.
-"
-
-option "channels" c
-#~~~~~~~~~~~~~~~~~~
-"specify number of channels"
-int typestr = "num"
-default = "2"
-optional
-
-option "sample-rate" s
-#~~~~~~~~~~~~~~~~~~~~~
-"force given sample rate"
-int typestr = "num"
-default = "44100"
-optional
-
-option "sample-format" f
-#~~~~~~~~~~~~~~~~~~~~~~~
-"specify sample format"
-# This must match the enum sample_format of para.h
-values = "S8", "U8", "S16_LE", "S16_BE", "U16_LE", "U16_BE" enum
-default = "S16_LE"
-optional
-
diff --git a/m4/gengetopt/afh.m4 b/m4/gengetopt/afh.m4
new file mode 100644 (file)
index 0000000..ba7d790
--- /dev/null
@@ -0,0 +1,136 @@
+include(header.m4)
+<qu>
+text "
+para_afh, the audio format handler tool, is a stand-alone program
+contained in the paraslash package for analyzing and streaming audio
+files. It can be used to
+
+       - print tech info about the given audio file to stdout.
+       In particular, the 'chunk table' of the audio file, an array
+       of offsets within the audio file, may be printed. This table
+       can be used by other programs unaware of the particular audio
+       format to stream the audio file.
+
+       - write selected parts of the given audio file in complete
+       chunks without decoding. Thus para_afh can be used to 'cut'
+       an audio file.
+
+       - write selected parts of the given audio files 'just in time'
+       to stdout. This may be useful for third-party software that
+       is capable of reading from stdin.
+"
+</qu>
+
+include(loglevel.m4)
+
+<qu>
+defgroup "mode"
+#--------------
+groupdesc="
+       There are two modes of operation: Info mode and stream mode,
+       one of which must be selected by the corresponding option.
+       See below.
+"
+required
+
+groupoption "info" i
+#~~~~~~~~~~~~~~~~~~~
+"select info mode"
+group="mode"
+details="
+       In this mode, the program prints technical information about
+       the given audio file to stdout.
+"
+
+groupoption "stream" s
+#~~~~~~~~~~~~~~~~~~~~~
+"select stream mode"
+group="mode"
+details="
+       If this mode is selected, the selected parts of the content
+       of the audio file are written to stdout. Only complete chunks
+       with respect of the underlying audio format are written.
+       For example, only complete frames in case of mp3 files.
+"
+
+section "Options for info mode"
+#==============================
+
+option "chunk_table" c
+#~~~~~~~~~~~~~~~~~~~~~
+"print also the chunk table"
+flag off
+dependon="info"
+
+option "human" u
+#~~~~~~~~~~~~~~~
+"use human-readable output format"
+flag off
+dependon = "info"
+details = "
+       Currently this option only affects the format of the chunk table,
+       so it has no effect if --chunk_table is not given.
+
+       The human-readable output consists of one output line per
+       chunk and the output contains also the chunk number, the
+       duration and the size of each chunk.
+"
+
+section "Options for stream mode"
+#================================
+
+
+option "begin_chunk" b
+#~~~~~~~~~~~~~~~~~~~~~
+"skip a number of chunks"
+int typestr="chunk_num"
+default="0"
+dependon="stream"
+optional
+details="
+       The chunk_num argument must be between -num_chunks and
+       num_chunks - 1 inclusively where num_chunks is the total number
+       of chunks which is printed when using the --info option. If
+       chunk_num is negative, the given number of chunks are counted
+       backwards from the end of the file. For example --begin_chunk
+       -100 instructs para_afh to start output at chunk num_chunks
+       - 100. This is mainly useful for cutting off the end of an
+       audio file.
+"
+
+option "end_chunk" e
+#~~~~~~~~~~~~~~~~~~~
+"only write up to chunk chunk_num"
+int typestr="chunk_num"
+dependon="stream"
+optional
+details="
+       For the chunk_num argument the same rules as for --begin_chunk
+       apply.  The default is to write up to the last chunk.
+"
+
+option "just_in_time" j
+#~~~~~~~~~~~~~~~~~~~~~~
+"use timed writes"
+flag off
+dependon="stream"
+details="
+       Write the specified chunks of data 'just in time', i.e. the
+       write of each chunk is delayed until the time it is needed
+       by the decoder/player in order to guarantee an uninterrupted
+       audio stream.
+"
+
+option "no_header" H
+#~~~~~~~~~~~~~~~~~~~
+"do not write an audio file header"
+flag off
+dependon="stream"
+details="
+       If an audio format needs information about the audio file
+       in a format-specific header in order to be understood by
+       the decoding software, a suitable header is automatically
+       send. This option changes the default behaviour, i.e. no
+       header is written.
+"
+</qu>
diff --git a/m4/gengetopt/alsa_write.m4 b/m4/gengetopt/alsa_write.m4
new file mode 100644 (file)
index 0000000..d0cd407
--- /dev/null
@@ -0,0 +1,14 @@
+include(header.m4)
+
+<qu>
+option "device" d
+#~~~~~~~~~~~~~~~~
+"set PCM device"
+string typestr="device"
+default="default"
+optional
+details="
+       On systems with dmix, a better choice than the default
+       value might be to use \"plug:swmix\".
+"
+</qu>
diff --git a/m4/gengetopt/amp_filter.m4 b/m4/gengetopt/amp_filter.m4
new file mode 100644 (file)
index 0000000..865df3a
--- /dev/null
@@ -0,0 +1,17 @@
+option "amp" a
+#~~~~~~~~~~~~~
+"amplification value"
+int typestr="number"
+default="32"
+optional
+details="
+       The amplification value determines the scaling factor by
+       which the amplitude of the audio stream is multiplied. The
+       formula for the scaling factor is
+
+               factor = 1 + amp / 64.
+
+       For example, an amplifiction value of zero results in a
+       scaling factor of one while an amplification value of 64
+       means to double the volume.
+"
diff --git a/m4/gengetopt/ao_write.m4 b/m4/gengetopt/ao_write.m4
new file mode 100644 (file)
index 0000000..baccc57
--- /dev/null
@@ -0,0 +1,26 @@
+include(header.m4)
+<qu>
+
+option "driver" d
+#~~~~~~~~~~~~~~~~
+"Select a output driver by name"
+string typestr = "name"
+optional
+details = "
+       If this is not given, the driver with the highest priority
+       (see below) will be used.
+"
+
+option "ao-option" o
+#~~~~~~~~~~~~~~~~~~~
+"Pass a key-value pair to the libao driver"
+string typestr = "key:value"
+optional
+multiple
+details = "
+       For each time this option is given, the supplied key-value
+       pair is appended to the list of options for the driver. Invalid
+       keys are silently ignored.
+"
+
+</qu>
diff --git a/m4/gengetopt/audioc.m4 b/m4/gengetopt/audioc.m4
new file mode 100644 (file)
index 0000000..5ecc2a9
--- /dev/null
@@ -0,0 +1,22 @@
+include(header.m4)
+<qu>
+option "socket" s
+#~~~~~~~~~~~~~~~~
+"well-known socket (default=/var/paraslash/audiod.socket.$HOSTNAME)"
+       string typestr="filename"
+       optional
+
+
+option "bufsize" b
+#~~~~~~~~~~~~~~~~~
+"size of internal buffer"
+       int typestr="bytes"
+       default="8192"
+       optional
+</qu>
+
+define(CURRENT_PROGRAM,para_audioc)
+define(DEFAULT_HISTORY_FILE,~/.paraslash/audioc.history)
+include(loglevel.m4)
+include(history_file.m4)
+include(complete.m4)
diff --git a/m4/gengetopt/audiod.m4 b/m4/gengetopt/audiod.m4
new file mode 100644 (file)
index 0000000..9aabd57
--- /dev/null
@@ -0,0 +1,208 @@
+include(header.m4)
+define(CURRENT_PROGRAM,para_audiod)
+define(DEFAULT_CONFIG_FILE,~/.paraslash/audiod.conf)
+
+<qu>
+#########################
+section "General options"
+#########################
+</qu>
+
+include(loglevel.m4)
+include(color.m4)
+include(config_file.m4)
+include(logfile.m4)
+include(log_timing.m4)
+include(daemon.m4)
+include(user.m4)
+include(group.m4)
+
+<qu>
+########################
+section "Audiod options"
+########################
+
+option "force" F
+#~~~~~~~~~~~~~~~
+"force startup"
+flag off
+details="
+       If this flag is not given, para_audiod refuses to start if the
+       well-known socket file (see the --socket option) already exists
+       because this usually means that para_audiod is already running
+       and listening on that socket. After a crash or if para_audiod
+       received a SIGKILL signal, a stale socket file might remain and
+       you have to use --force once to force startup of para_audiod.
+"
+
+option "mode" m
+#~~~~~~~~~~~~~~
+"startup mode"
+string typestr="mode"
+default="on"
+optional
+details="
+       Para_audiod supports three modes of operation: On, off and
+       standby (sb).  This option selects the mode that should be
+       used on startup. If para_audiod operates in \"on\" mode, it
+       will connect to para_server in order to receive its status
+       information. If para_server announces the availability of an
+       audio stream, para_audiod will automatically download, decode
+       and play the audio stream according to the given stream I/O
+       options, see below.
+
+       In \"standby\" mode, para_audiod will only receive the
+       status information from para_server but will not download
+       the audio stream.
+
+       In \"off\" mode, para_audiod does not connect para_server at
+       all, but still listens on the local socket for connections.
+"
+
+option "socket" s
+#~~~~~~~~~~~~~~~~
+"well-known socket"
+string typestr="filename"
+optional
+details="
+       Para_audiod uses a \"well-known\" socket to listen
+       on for connections from para_audioc. This socket is a
+       special file in the file system; its location defaults to
+       /var/paraslash/audiod_sock.<host_name>.
+
+       para_audioc, the client program used to connect to para_audiod,
+       opens this socket in order to talk to para_audiod.  If the
+       default value for para_audiod is changed, para_audioc must be
+       instructed to use also \"filename\" for connecting para_audiod.
+"
+
+option "user_allow" -
+#~~~~~~~~~~~~~~~~~~~~
+"allow this uid"
+int typestr="uid"
+default="-1"
+optional
+multiple
+details="
+       Allow the user identified by \"uid\" to connect to para_audiod.
+       May be specified multiple times. If not specified at all,
+       all users are allowed to connect.
+
+       This feature requires unix socket credentials and is currently
+       only supported on Linux systems. On other operating systems,
+       the option is silently ignored and all local users are allowed
+       to connect to para_audiod.
+"
+
+option "clock_diff_count" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~
+"sync clock on startup"
+int typestr="count"
+default="0"
+optional
+details="
+       Check the clock difference between the host running para_server
+       and the local host running para_audiod that many times before
+       starting any stream I/0. Set this to non-zero for non-local
+       setups if the clocks of these two hosts are not synchronized
+       by ntp or similar.
+"
+
+#############################
+section "Stream I/O options"
+#############################
+
+option "receiver" r
+#~~~~~~~~~~~~~~~~~~
+"select receiver"
+string typestr="receiver_spec"
+default="http"
+optional
+multiple
+details="
+       This option may be given multiple times, for each audio format
+       separately. If multiple definitions for an audio format are
+       given, the first one is selected.
+
+       The \"receiver_spec\" consists of an audio format specifier
+       and one or more receiver arguments, separated by a colon.
+
+       The audio format specifier is a regular expression which
+       specifies the set of audio formats for which this option
+       should apply.
+
+       If any receiver options are present, the whole receiver
+       argument must be quoted:
+
+               -r 'mp3:http -i my.host.org -p 8009'
+
+       Since a single dot '.' matches the name of any audio format,
+       specifying '.' instead of 'mp3' above activates the http
+       receiver for all audio formats.
+
+"
+
+option "filter" f
+#~~~~~~~~~~~~~~~~
+"Specify the filter configuration."
+string typestr = "filter_spec"
+optional
+multiple
+details = "
+       This option may be given multiple times. The \"filter_spec\"
+       consists of an audio format specifier (see above), the name
+       of the filter, and any options for that filter. Note that
+       order matters.
+
+       The compiled-in defaults apply to all audio formats for which
+       no --filter option was given. These defaults depend on the
+       receiver being used.
+
+       For HTTP streams, only the decoder for the current audio
+       format is activated. UDP and DCCP streams, on the other
+       hand, are sent FEC-encoded by para_server. In order to play
+       such streams, the receiver output must be FEC-decoded first,
+       i.e. fed to the fecdec filter. Therefore the default for UDP
+       and DCCP streams is to activate the fecdec filter, followed
+       by the decoding filter for the audio format.
+
+       Examples:
+
+               --filter 'mp3:mp3dec'
+
+               --filter 'mp3|aac:compress --inertia 5 --damp 2'
+
+               --filter '.:fecdec'
+
+"
+
+option "writer" w
+#~~~~~~~~~~~~~~~~
+"Specify stream writer."
+string typestr="writer_spec"
+optional
+multiple
+details="
+       May be given multiple times, even multiple times for the same
+       audio format.  Default value is \"alsa\" for all supported
+       audio formats. Example:
+
+               --writer 'aac|wma:oss'
+
+"
+
+option "stream_delay" -
+#~~~~~~~~~~~~~~~~~~~~~~
+"time for client sync"
+int typestr="milliseconds"
+default="200"
+optional
+details="
+       Add the given amount of milliseconds to the stream start time
+       announced by para_server and do not send data to the writer
+       before that time (modulo clock difference).
+
+       This is useful mainly for synchronizing the audio output of
+       different clients.
+"
+</qu>
diff --git a/m4/gengetopt/client.m4 b/m4/gengetopt/client.m4
new file mode 100644 (file)
index 0000000..8ade508
--- /dev/null
@@ -0,0 +1,16 @@
+include(header.m4)
+define(CURRENT_PROGRAM,para_client)
+define(DEFAULT_CONFIG_FILE,~/.paraslash/client.conf)
+define(DEFAULT_HISTORY_FILE,~/.paraslash/client.history)
+<qu>
+args "--no-handle-error"
+option "hostname" i "ip or host to connect" string typestr="host" default="localhost" optional
+option "user" u "paraslash username" string typestr="username" default="<current user>" optional
+option "server_port" p "port to connect" int typestr="port" default="2990" optional
+option "key_file" k "(default='~/.paraslash/key.<user>')" string typestr="filename" optional
+</qu>
+
+include(loglevel.m4)
+include(config_file.m4)
+include(history_file.m4)
+include(complete.m4)
diff --git a/m4/gengetopt/color.m4 b/m4/gengetopt/color.m4
new file mode 100644 (file)
index 0000000..63e996f
--- /dev/null
@@ -0,0 +1,34 @@
+<qu>
+
+option "color" C
+#~~~~~~~~~~~~~~~
+"activate color output"
+enum typestr="when"
+values = "yes","no","auto"
+default = "auto"
+optional
+
+option "log_color" -
+#~~~~~~~~~~~~~~~~~~~
+"select a color for one type of log message"
+string typestr="color_spec"
+multiple
+optional
+details="
+       The format of \"color_spec\" is [fg [bg]] [attr].
+
+       Valid colors for \"fg\" and \"bg\" are \"normal\", \"black\",
+       \"red\", \"green\", \"yellow\", \"blue\", \"magenta\",
+       \"cyan\", and \"white\".
+
+       The \"attr\" value must be one of \"bold\", \"dim\", \"ul\",
+       \"blink\", \"reverse\".
+
+       Examples:
+
+               --log_color \"debug:green\"
+               --log_color \"info:yellow bold\"
+               --log_color \"notice:white red bold\"
+"
+
+</qu>
diff --git a/m4/gengetopt/complete.m4 b/m4/gengetopt/complete.m4
new file mode 100644 (file)
index 0000000..14e737c
--- /dev/null
@@ -0,0 +1,12 @@
+<qu>
+option "complete" -
+#~~~~~~~~~~~~~~~~~~
+"print possible command line completions"
+       flag off
+       details = "
+       If this flag is given, </qu>CURRENT_PROGRAM<qu> reads the environment
+       variables COMP_LINE and COMP_POINT to obtain the current command line
+       and the cursor position respectively, prints possible completions
+       to stdout and exits.
+"
+</qu>
diff --git a/m4/gengetopt/compress_filter.m4 b/m4/gengetopt/compress_filter.m4
new file mode 100644 (file)
index 0000000..74dcbc0
--- /dev/null
@@ -0,0 +1,37 @@
+option "blocksize" b
+#~~~~~~~~~~~~~~~~~~~
+"adjust block size"
+int typestr="number"
+default="15"
+optional
+details = "
+       Larger blocksize means fewer volume adjustments per time unit.
+"
+
+option "aggressiveness" a
+#~~~~~~~~~~~~~~~~~~~~~~~~
+ "controls the maximum amount to amplify by"
+int typestr="number"
+default="4"
+optional
+
+option "inertia" i
+#~~~~~~~~~~~~~~~~~
+ "how much inertia ramping has"
+ int typestr="number"
+default="6"
+optional
+
+option "target_level" t
+#~~~~~~~~~~~~~~~~~~~~~~
+"target signal level (0-32768)"
+int typestr="number"
+default="20000"
+optional
+
+option "damp" d
+#~~~~~~~~~~~~~~
+"if non-zero, scale down after normalizing"
+int typestr="number"
+default="0"
+optional
diff --git a/m4/gengetopt/config_file.m4 b/m4/gengetopt/config_file.m4
new file mode 100644 (file)
index 0000000..318ba7a
--- /dev/null
@@ -0,0 +1,14 @@
+<qu>
+option "config_file" c
+#~~~~~~~~~~~~~~~~~~~~~
+"(default='</qu>DEFAULT_CONFIG_FILE<qu>')"
+string typestr="filename"
+optional
+details="
+       </qu>CURRENT_PROGRAM<qu> reads its config file right after parsing
+       the options that were given at the command line. If an
+       option is given both at the command line and in the
+       config file, the value that was specified at the command line
+       takes precedence.
+"
+</qu>
diff --git a/m4/gengetopt/daemon.m4 b/m4/gengetopt/daemon.m4
new file mode 100644 (file)
index 0000000..b4e842a
--- /dev/null
@@ -0,0 +1,11 @@
+<qu>
+option "daemon" d
+#~~~~~~~~~~~~~~~~
+"run as background daemon"
+flag off
+dependon="logfile"
+details="
+       Note that </qu>CURRENT_PROGRAM<qu> refuses to start in daemon mode if no
+       logfile was specified.
+"
+</qu>
diff --git a/m4/gengetopt/dccp_recv.m4 b/m4/gengetopt/dccp_recv.m4
new file mode 100644 (file)
index 0000000..80d3123
--- /dev/null
@@ -0,0 +1,37 @@
+option "host" i
+"ip or host"
+string default="localhost"
+optional
+details="
+       Both IPv4 and IPv6 addresses are supported.
+"
+
+option "port" p
+"port to connect to"
+int
+default="8000"
+optional
+
+option "ccid" c
+"CCID preference(s) for this connection"
+int
+# restrict the maximum number of times this option can be passed
+optional multiple(-10)
+# currently known CCIDs:
+# - CCID-2 (RFC 4341),
+# - CCID-3 (RFC 4342),
+# - CCID-4 (RFC 5622),
+# - CCID-248 ... CCID-254 are experimental (RFC 4340, 19.5)
+values="2", "3", "4", "248", "249", "250", "251", "252", "253", "254"
+details="
+       When present exactly once, this option mandates the CCID for the
+       sender-receiver connection. If it is passed more than once, it sets
+       a preference list where the order of appearance signifies descending
+       priority. For example, passing 4, 2, 3 creates the preference list
+       (CCID-4, CCID-2, CCID-3), assigning CCID-4 highest preference.
+
+       The request is reconciled with the CCIDs on the server through the
+       'server-priority' mechanism of RFC 4340 6.3.1/10. The server CCIDs
+       can be listed by calling 'para_client si'.
+
+"
diff --git a/m4/gengetopt/fade.m4 b/m4/gengetopt/fade.m4
new file mode 100644 (file)
index 0000000..80f8b73
--- /dev/null
@@ -0,0 +1,200 @@
+section "General options"
+#########################
+
+option "mode" o
+#~~~~~~~~~~~~~~
+"how to fade volume"
+       enum typestr = "mode"
+       values = "sleep", "snooze", "fade"
+       default = "sleep"
+       optional
+       details="
+               para_fade knows three different fading modes:
+
+               sleep mode: Change to the initial volume and select
+               the initial afs mood/playlist. Then fade out until
+               the fade-out volume is reached. Switch to the
+               sleep mood/playlist until wake time minus fade-in
+               time. Finally switch to the wake mood/playlist and
+               fade to the fade-in volume.
+
+               fade: Fade the volume to the given value in the
+               given time.
+
+               snooze: Fade out, sleep a bit and fade in.
+"
+
+option "config-file" c
+#~~~~~~~~~~~~~~~~~~~~~
+"(default='~/.paraslash/fade.conf')"
+       string typestr = "filename"
+       optional
+
+option "mixer-device" m
+#~~~~~~~~~~~~~~~~~~~~~~
+"mixer device file"
+       string typestr = "device"
+       default = "/dev/mixer"
+       optional
+
+option "mixer-channel" C
+#~~~~~~~~~~~~~~~~~~~~~~~
+"select the analog mixer channel"
+       enum typestr = "channel"
+       values = "volume", "bass", "treble", "synth", "pcm", "speaker", "line",
+               "mic", "cd", "imix", "altpcm", "reclev", "igain", "ogain"
+       default = "volume"
+       optional
+       details = "
+               Not all listed channels might be supported on any
+               particular hardware.
+"
+
+section "Options for sleep mode"
+################################
+
+option "ivol" -
+#~~~~~~~~~~~~~~
+"set initial volume"
+       int typestr = "volume"
+       default = "60"
+       optional
+       details = "
+               Used as the start volume, before fading out to the
+               fade out volume.
+       "
+
+option "fo-mood" -
+#~~~~~~~~~~~~~~~~~
+"afs mood/playlist during fade out"
+       string typestr = "mood_spec"
+       default = "m/fade"
+       optional
+       details = "
+               Select this mood right after setting the
+               volume. Example: --fo-mood m/sleep
+"
+
+option "fo-time" -
+#~~~~~~~~~~~~~~~~~
+"fall asleep fade out time"
+       int typestr = "seconds"
+       default = "1800"
+       optional
+       details = "
+               No fading if set to 0.
+       "
+
+option "fo-vol" -
+#~~~~~~~~~~~~~~~~
+"volume to fade out to"
+       int typestr = "volume"
+       default = "20"
+       optional
+
+option "sleep-mood" -
+#~~~~~~~~~~~~~~~~~~~~
+"sleep time afs mood/playlist"
+       string typestr = "mood_spec"
+       default = "m/sleep"
+       optional
+       details = "
+               Select the given afs mood/playlist after the fade
+               out is complete. If unset, the \"stop\" command is
+               sent to para_server.
+       "
+
+option "wake-hour" H
+#~~~~~~~~~~~~~~~~~~~
+"(0-23) (default: now + 9 hours)"
+       int typestr = "hour"
+       optional
+
+option "wake-min" M
+#~~~~~~~~~~~~~~~~~~
+"(0-59)"
+       int typestr = "minutes"
+       default = "0"
+       optional
+
+option "fi-mood" -
+#~~~~~~~~~~~~~~~~~
+"afs mood/playlist during fade in"
+       string typestr = "mood_spec"
+       default = "m/wake"
+       optional
+       details = "
+               Change to this afs mood/playlist on wake time.
+       "
+
+option "fi-time" -
+#~~~~~~~~~~~~~~~~~
+"wake up fade in time"
+       int typestr="seconds"
+       default="1200"
+       optional
+       details = "
+               No fading in if set to 0.
+       "
+
+option "fi-vol" -
+#~~~~~~~~~~~~~~~~
+"volume to fade to at wake time"
+       int typestr = "volume"
+       default = "80"
+       optional
+
+section "Options for snooze mode"
+#################################
+
+option "so-time" -
+#~~~~~~~~~~~~~~~~~
+"snooze-out time"
+       int typestr = "seconds"
+       default = "30"
+       optional
+
+option "so-vol" -
+#~~~~~~~~~~~~~~~~
+"volume to fade to before snooze"
+       int typestr = "volume"
+       default = "20"
+       optional
+
+option "snooze-time" -
+#~~~~~~~~~~~~~~~~~~~~~
+"delay"
+       int typestr = "seconds"
+       default = "600"
+       optional
+
+option "si-time" -
+#~~~~~~~~~~~~~~~~~
+"snooze-in time"
+       int typestr = "seconds"
+       default = "180"
+       optional
+
+option "si-vol" -
+#~~~~~~~~~~~~~~~~
+"volume to fade to after snooze"
+       int typestr = "volume"
+       default = "80"
+       optional
+
+section "Options for fade mode"
+###############################
+
+option "fade-vol" f
+#~~~~~~~~~~~~~~~~~~
+"volume to fade to"
+       int typestr = "volume"
+       default = "50"
+       optional
+
+option "fade-time" t
+#~~~~~~~~~~~~~~~~~~~
+"fading time"
+       int typestr = "seconds"
+       default = "5"
+       optional
diff --git a/m4/gengetopt/file_write.m4 b/m4/gengetopt/file_write.m4
new file mode 100644 (file)
index 0000000..56c44f7
--- /dev/null
@@ -0,0 +1,9 @@
+option "filename" f
+#~~~~~~~~~~~~~~~~~~
+"specify output file name"
+string typestr="filename"
+optional
+details="
+       Defaults to a random filename in ~/.paraslash.
+"
+
diff --git a/m4/gengetopt/filter.m4 b/m4/gengetopt/filter.m4
new file mode 100644 (file)
index 0000000..9df0f3f
--- /dev/null
@@ -0,0 +1,21 @@
+include(header.m4)
+include(loglevel.m4)
+<qu>
+option "filter" f
+#~~~~~~~~~~~~~~~~
+"Specify filter."
+string typestr="filter_spec"
+optional
+multiple
+details="
+       May be given multiple times to 'pipe' the stream through
+       arbitrary many filters (without copying the data). The same
+       filter may appear more than once, order matters.
+
+       Options for a particular filter may be specified for each
+       given '--filter' option separately. You will have to quote
+       these options like this:
+
+               --filter 'compress --inertia 5 --damp 2'
+"
+</qu>
diff --git a/m4/gengetopt/fsck.m4 b/m4/gengetopt/fsck.m4
new file mode 100644 (file)
index 0000000..d593058
--- /dev/null
@@ -0,0 +1,43 @@
+include(header.m4)
+include(loglevel.m4)
+
+<qu>
+option "base_dir" b
+#~~~~~~~~~~~~~~~~~~
+"Full path to the database directory
+containing the table(s) to be checked.
+(default='~/.paraslash/afs_database'"
+
+       string typestr="path"
+       optional
+
+option "dump_dir" d
+#~~~~~~~~~~~~~~~~~~
+"If path is non-empty, para_fsck will write a
+dump of all given tables to the specified
+path."
+
+       string typestr="path"
+       optional
+       default=""
+
+option "no_fsck" n
+#~~~~~~~~~~~~~~~~~
+"Disable fsck mode."
+
+       flag off
+
+option "force" f
+#~~~~~~~~~~~~~~~
+"Force fsck even if the table is dirty.
+Ignored if -n is given."
+
+       flag off
+
+option "dry_run" -
+#~~~~~~~~~~~~~~~~~
+"Only report problems, don't try to fix them."
+
+       flag off
+
+</qu>
diff --git a/m4/gengetopt/group.m4 b/m4/gengetopt/group.m4
new file mode 100644 (file)
index 0000000..2a59ad9
--- /dev/null
@@ -0,0 +1,12 @@
+option "group" g
+#~~~~~~~~~~~~~~~
+"set group id"
+string typestr="group"
+optional
+details="
+       This option sets the group id according to 'group'. This option
+       is silently ignored if EUID != 0. Otherwise, real/effective
+       GID and the saved set-group ID are all set to the GID given by
+       'group'. Must not be given in the config file.
+"
+
diff --git a/m4/gengetopt/gui.m4 b/m4/gengetopt/gui.m4
new file mode 100644 (file)
index 0000000..895229b
--- /dev/null
@@ -0,0 +1,67 @@
+include(header.m4)
+define(CURRENT_PROGRAM,para_gui)
+define(DEFAULT_CONFIG_FILE,~/.paraslash/gui.conf)
+
+<qu>
+#########################
+section "General options"
+#########################
+</qu>
+
+include(config_file.m4)
+include(loglevel.m4)
+
+<qu>
+option "timeout" t
+#~~~~~~~~~~~~~~~~~
+"set timeout"
+int typestr = "milliseconds"
+default = "30"
+optional
+
+option "theme" T
+#~~~~~~~~~~~~~~~
+"select startup theme"
+string typestr = "name"
+optional
+details = "
+       If this option is not given the default theme is used.
+       If the given name is not a valid theme name, the list of
+       available themes is printed and the program terminates.
+"
+
+option "stat_cmd" s
+#~~~~~~~~~~~~~~~~~~
+"command to read status items from"
+string typestr = "command"
+default = "para_audioc -- stat -p"
+optional
+details = "
+       In order to run para_gui on a host on which no para_audiod
+       is running (hence the default command does not work), the
+       command
+
+               para_client -- stat -p
+
+       may be used. This command prints less information though.
+       In particular, no timing information about the current audio
+       file is printed.
+"
+
+#---------------------------------
+section "Mapping keys to commands"
+#---------------------------------
+
+option "key_map" k
+#~~~~~~~~~~~~~~~~~
+"Map key k to command c using mode m."
+
+string typestr = "k:m:c"
+optional
+multiple
+details = "
+       Mode may be d, x or p for display, external and paraslash
+       commands, respectively. Of course, this option may be given
+       multiple times, one for each key mapping.
+"
+</qu>
diff --git a/m4/gengetopt/header.m4 b/m4/gengetopt/header.m4
new file mode 100644 (file)
index 0000000..c423187
--- /dev/null
@@ -0,0 +1 @@
+changequote(<qu>,</qu>)
diff --git a/m4/gengetopt/history_file.m4 b/m4/gengetopt/history_file.m4
new file mode 100644 (file)
index 0000000..932d88b
--- /dev/null
@@ -0,0 +1,12 @@
+<qu>
+option "history_file" -
+#~~~~~~~~~~~~~~~~~~~~~~
+"(default='</qu>DEFAULT_HISTORY_FILE<qu>')"
+string typestr = "filename"
+optional
+details = "
+       If </qu>CURRENT_PROGRAM<qu> runs in interactive mode, it reads the history
+       file on startup. Upon exit, the in-memory history is appended
+       to the history file.
+"
+</qu>
diff --git a/m4/gengetopt/http_recv.m4 b/m4/gengetopt/http_recv.m4
new file mode 100644 (file)
index 0000000..14ae99a
--- /dev/null
@@ -0,0 +1,19 @@
+include(header.m4)
+
+<qu>
+option "host" i
+#~~~~~~~~~~~~~~
+"ip or host"
+string
+default="localhost"
+optional
+details="
+       Both IPv4 and IPv6 addresses are supported.
+"
+
+option "port" p
+#~~~~~~~~~~~~~~
+"tcp port to connect to"
+int default="8000"
+optional
+</qu>
diff --git a/m4/gengetopt/log_timing.m4 b/m4/gengetopt/log_timing.m4
new file mode 100644 (file)
index 0000000..ac0ea84
--- /dev/null
@@ -0,0 +1,12 @@
+<qu>
+option "log-timing" T
+#~~~~~~~~~~~~~~~~~~~~
+"show milliseconds in log messages"
+flag off
+details = "
+       Selecting this option causes milliseconds to be included in
+       the log message output. This allows to measure the interval
+       between log messages in milliseconds which is useful for
+       identifying timing problems.
+"
+</qu>
diff --git a/m4/gengetopt/logfile.m4 b/m4/gengetopt/logfile.m4
new file mode 100644 (file)
index 0000000..bb10293
--- /dev/null
@@ -0,0 +1,11 @@
+<qu>
+option "logfile" L
+#~~~~~~~~~~~~~~~~~
+"where to write log output"
+string typestr="filename"
+optional
+details="
+       If this option is not given, </qu>CURRENT_PROGRAM<qu> writes the log
+       messages to to stderr
+"
+</qu>
diff --git a/m4/gengetopt/loglevel.m4 b/m4/gengetopt/loglevel.m4
new file mode 100644 (file)
index 0000000..162d030
--- /dev/null
@@ -0,0 +1,22 @@
+<qu>
+option "loglevel" l
+#~~~~~~~~~~~~~~~~~~
+"set loglevel"
+string typestr="level"
+values = "debug","info","notice","warning","error","crit","emerg"
+default="warning"
+optional
+details="
+       Log only messages with severity greater or equal the given
+       value.
+
+       debug: Produces really noisy output.
+       info: Still noisy, but won't fill up the disk quickly.
+       notice: Indicates normal, but significant event.
+       warning: Unexpected events that can be handled.
+       error: Unhandled error condition.
+       crit: System might be unreliable.
+       emerg: Last message before exit.
+"
+
+</qu>
diff --git a/m4/gengetopt/makefile b/m4/gengetopt/makefile
new file mode 100644 (file)
index 0000000..8b0c1f8
--- /dev/null
@@ -0,0 +1,75 @@
+module_ggo_opts := --set-version="($(PACKAGE_STRING), $(codename))"
+$(cmdline_dir):
+       mkdir -p $(cmdline_dir)
+
+$(cmdline_dir)/%_recv.cmdline.h $(cmdline_dir)/%_recv.cmdline.c: $(ggo_dir)/%_recv.ggo | $(cmdline_dir)
+       @[ -z "$(Q)" ] || echo 'GGO $<'
+       $(Q) $(GENGETOPT) $(module_ggo_opts) \
+               --output-dir=$(cmdline_dir) \
+               --set-package=$(subst .ggo,,$(<F)) \
+               --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
+               --file-name=$(subst .ggo,,$(<F)).cmdline \
+               --func-name $(subst .ggo,,$(<F))_cmdline_parser < $<
+
+$(cmdline_dir)/%_filter.cmdline.h $(cmdline_dir)/%_filter.cmdline.c: $(ggo_dir)/%_filter.ggo | $(cmdline_dir)
+       @[ -z "$(Q)" ] || echo 'GGO $<'
+       $(Q) $(GENGETOPT) $(module_ggo_opts) \
+               --output-dir=$(cmdline_dir) \
+               --set-package=$(subst .ggo,,$(<F)) \
+               --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
+               --file-name=$(subst .ggo,,$(<F)).cmdline \
+               --func-name=$(subst _filter.ggo,,$(<F))_cmdline_parser < $<
+$(cmdline_dir)/%_write.cmdline.h $(cmdline_dir)/%_write.cmdline.c: $(ggo_dir)/%_write.ggo | $(cmdline_dir)
+       @[ -z "$(Q)" ] || echo 'GGO $<'
+       $(Q) $(GENGETOPT) -S $(module_ggo_opts) \
+               --output-dir=$(cmdline_dir) \
+               --set-package=$(subst .ggo,,$(<F)) \
+               --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
+               --file-name=$(subst .ggo,,$(<F)).cmdline \
+               --func-name $(subst _write.ggo,,$(<F))_cmdline_parser < $<
+
+define ggo-opts
+$(if $(filter gui,$(*F)), --no-handle-error) \
+$(if $(filter recv filter write audiod,$(*F)), --no-handle-help) \
+$(if $(filter afh,$(*F)), --unamed-opts=audio_file) \
+$(if $(filter client audioc,$(*F)), --unamed-opts=command) \
+$(if $(filter fsck,$(*F)), --unamed-opts=table, --conf-parser)\
+--output-dir=$(cmdline_dir) \
+--no-handle-version \
+--file-name=$(*F).cmdline \
+--func-name=$(*F)_cmdline_parser \
+--arg-struct-name=$(*F)_args_info \
+--set-package="para_$(*F)" \
+--set-version="$(PACKAGE_VERSION)"
+endef
+
+$(cmdline_dir)/%.cmdline.h $(cmdline_dir)/%.cmdline.c: $(ggo_dir)/%.ggo | $(cmdline_dir)
+       @[ -z "$(Q)" ] || echo 'GGO $<'
+       $(Q) $(GENGETOPT) $(ggo-opts) < $<
+
+$(ggo_dir)/server.ggo $(ggo_dir)/audiod.ggo: \
+       $(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/color.m4 \
+       $(m4_ggo_dir)/config_file.m4 $(m4_ggo_dir)/logfile.m4 \
+       $(m4_ggo_dir)/daemon.m4 $(m4_ggo_dir)/user.m4 \
+       $(m4_ggo_dir)/group.m4 $(m4_ggo_dir)/log_timing.m4 \
+       $(m4_ggo_dir)/config_file.m4
+
+$(ggo_dir)/afh.ggo: $(m4_ggo_dir)/loglevel.m4
+$(ggo_dir)/audioc.ggo: \
+       $(m4_ggo_dir)/loglevel.m4 \
+       $(m4_ggo_dir)/history_file.m4 \
+       $(m4_ggo_dir)/complete.m4
+$(ggo_dir)/filter.ggo: $(m4_ggo_dir)/loglevel.m4
+$(ggo_dir)/fsck.ggo: $(m4_ggo_dir)/loglevel.m4
+$(ggo_dir)/gui.ggo: $(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/config_file.m4
+$(ggo_dir)/recv.ggo: $(m4_ggo_dir)/loglevel.m4
+$(ggo_dir)/write.ggo: $(m4_ggo_dir)/loglevel.m4
+$(ggo_dir)/client.ggo: \
+       $(m4_ggo_dir)/loglevel.m4 \
+       $(m4_ggo_dir)/config_file.m4 \
+       $(m4_ggo_dir)/history_file.m4 \
+       $(m4_ggo_dir)/complete.m4
+
+$(ggo_dir)/%.ggo: $(m4_ggo_dir)/%.m4 $(m4_ggo_dir)/header.m4 | $(ggo_dir)
+       @[ -z "$(Q)" ] || echo 'M4 $<'
+       $(Q) m4 -I $(m4_ggo_dir) $< > $@
diff --git a/m4/gengetopt/mp3dec_filter.m4 b/m4/gengetopt/mp3dec_filter.m4
new file mode 100644 (file)
index 0000000..c02f158
--- /dev/null
@@ -0,0 +1,14 @@
+include(header.m4)
+
+<qu>
+option "ignore-crc" i
+#~~~~~~~~~~~~~~~~~~~~
+"ignore CRC information in the audio stream."
+flag off
+details="
+       This causes frames with CRC errors to be decoded and played
+       anyway. This option is not recommended, but since some encoders
+       have been known to generate bad CRC information, this option
+       is a work-around to play streams from such encoders.
+"
+</qu>
diff --git a/m4/gengetopt/oss_write.m4 b/m4/gengetopt/oss_write.m4
new file mode 100644 (file)
index 0000000..351561c
--- /dev/null
@@ -0,0 +1,7 @@
+option "device" d
+#~~~~~~~~~~~~~~~~
+"set PCM device"
+string typestr="device"
+default="/dev/dsp"
+optional
+details = ""
diff --git a/m4/gengetopt/osx_write.m4 b/m4/gengetopt/osx_write.m4
new file mode 100644 (file)
index 0000000..bee16d9
--- /dev/null
@@ -0,0 +1,13 @@
+section "osx options"
+#####################
+
+option "numbuffers" n
+#~~~~~~~~~~~~~~~~~~~~~
+
+"number of audio buffers to allocate (increase if
+you get buffer underruns)"
+
+       int typestr="num"
+       default="20"
+       optional
+       details = ""
diff --git a/m4/gengetopt/prebuffer_filter.m4 b/m4/gengetopt/prebuffer_filter.m4
new file mode 100644 (file)
index 0000000..7553e95
--- /dev/null
@@ -0,0 +1,24 @@
+option "duration" d
+#~~~~~~~~~~~~~~~~~~
+"prebuffer time"
+int typestr="milliseconds"
+default="200"
+optional
+details="
+       Wait that many milliseconds before letting data go through.
+       The time interval starts when the first data byte is seen by
+       this filter.
+"
+
+option "size" s
+#~~~~~~~~~~~~~~
+"amount of data to prebuffer"
+int typestr="bytes"
+default="0"
+optional
+details="
+       Wait until that many data bytes are available in the input buffer.
+       The default value of zero means to not prebuffer by size at all.
+       If both --duration and --size options are given and non-zero, the
+       filter waits until both conditions are met.
+"
diff --git a/m4/gengetopt/recv.m4 b/m4/gengetopt/recv.m4
new file mode 100644 (file)
index 0000000..9702e12
--- /dev/null
@@ -0,0 +1,16 @@
+include(header.m4)
+include(loglevel.m4)
+
+<qu>
+option "receiver" r
+"Select receiver"
+string typestr="receiver_spec"
+default="http"
+optional
+details="
+       Any options for the selected receiver must
+       be quoted. Example:
+
+               -r 'http -i www.paraslash.org -p 8009'
+"
+</qu>
diff --git a/m4/gengetopt/server.m4 b/m4/gengetopt/server.m4
new file mode 100644 (file)
index 0000000..8731561
--- /dev/null
@@ -0,0 +1,374 @@
+include(header.m4)
+define(CURRENT_PROGRAM,para_server)
+define(DEFAULT_CONFIG_FILE,~/.paraslash/server.conf)
+
+<qu>
+#########################
+section "General options"
+#########################
+</qu>
+
+include(loglevel.m4)
+include(log_timing.m4)
+include(color.m4)
+include(daemon.m4)
+include(user.m4)
+include(group.m4)
+
+<qu>
+option "port" p
+#~~~~~~~~~~~~~~
+"listening port"
+int typestr="portnumber"
+default="2990"
+optional
+details="
+       para_server listens on this tcp port for incoming connections
+       from clients such as para_client. If the default port is
+       changed, the corresponding option of para_client must be used
+       to connect to para_server.
+"
+
+#############################
+section "Configuration files"
+#############################
+</qu>
+
+include(logfile.m4)
+include(config_file.m4)
+
+<qu>
+option "user_list" -
+#~~~~~~~~~~~~~~~~~~~
+"(default='~/.paraslash/server.users')"
+
+string typestr="filename"
+optional
+
+
+##################################
+section "virtual streaming system"
+##################################
+
+
+option "autoplay" a
+#~~~~~~~~~~~~~~~~~~
+"start playing on startup"
+flag off
+
+option "autoplay_delay" -
+#~~~~~~~~~~~~~~~~~~~~~~~~
+"time to wait before streaming"
+int typestr="ms"
+default="0"
+optional
+dependon="autoplay"
+details="
+       If para_server is started with the autoplay option, this option
+       may be used to set up a delay before para_server streams its
+       first audio file. This is useful for example if para_server
+       and para_audiod are started during system startup. The delay
+       time should be choosen large enough so that para_audiod is
+       already up when para_server starts to stream. Of course, this
+       option depends on the autoplay option.
+"
+option "announce_time" A
+#~~~~~~~~~~~~~~~~~~~~~~~
+"grace time for clients"
+
+int typestr="ms"
+default="300"
+optional
+details="
+       Clients such as para_audiod connect to para_server and execute
+       the stat command to find out whether an audio stream is
+       currently available. This sets the delay betweeen announcing
+       the stream via the output of the stat command and sending
+       the first chunk of data.
+"
+
+#############################
+section "audio file selector"
+#############################
+
+option "afs_database_dir" D
+#~~~~~~~~~~~~~~~~~~~~~~~~~~
+"location of the database"
+string typestr="path"
+optional
+details="
+       Where para_server should look for the osl database of the audio
+       file selector. The default is '~/.paraslash/afs_database-0.4'.
+"
+
+option "afs_socket" s
+#~~~~~~~~~~~~~~~~~~~~
+"Command socket for afs"
+string typestr="path"
+default="/var/paraslash/afs_command_socket-0.4"
+optional
+details="
+       For each server command that is handled by the audio file
+       selector, the child process of para_server connects to the
+       audio file selector via a local socket. This option specifies
+       the location of that socket in the file system.
+"
+option "afs_initial_mode" i
+#~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+"Mood or playlist to load on startup."
+string typestr="<specifier>/<name>"
+optional
+
+details="
+       The argument of this option must be prefixed with either 'p/'
+       or 'm/' to indicate whether a playlist or a mood should be
+       loaded. Example:
+               --afs_initial_mode p/foo
+       loads the playlist named 'foo'.
+"
+
+#####################
+section "http sender"
+#####################
+
+
+option "http_port" -
+#~~~~~~~~~~~~~~~~~~~
+"tcp port for http streaming"
+int typestr="portnumber"
+default="8000"
+optional
+details="
+       The http sender of para_server listens on this port for
+       incoming connections. Clients are expected to send the usual
+       http request message such as 'GET / HTTP/'.
+"
+
+option "http_default_deny" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"make the http ACL a whitelist"
+flag off
+details="
+       The default is to use blacklists instead, i.e. connections
+       to the http sender are allowed unless the connecting host
+       matches a pattern given by a http_access option. This allows
+       to use access control the other way round: Connections are
+       denied from hosts which are not explicitly allowed by one or
+       more http_access options.
+"
+
+option "http_access" -
+#~~~~~~~~~~~~~~~~~~~~~
+"add an entry to the http ACL"
+string typestr="a.b.c.d/n"
+optional
+multiple
+details="
+       Add given host/network to access control list (whitelist if
+       http_default_deny was given, blacklist otherwise) before
+       opening the tcp port. This option can be given multiple
+       times. Example: '192.168.0.0/24' whitelists/blacklists the
+       256 hosts 192.168.0.x
+"
+
+option "http_no_autostart" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"do not open tcp port on startup"
+flag off
+details="
+       If this option is given, the http sender does not listen on
+       its tcp port. It may be instructed to open this port at a
+       later time by using the sender command.
+"
+
+option "http_max_clients" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~
+"maximal number of connections"
+int typestr="number"
+default="-1"
+optional
+details="
+       The http sender will refuse connections if already that number
+       of clients are currently connected. A non-positive value
+       (the default) allows an unlimited number of simultaneous
+       connections.
+"
+
+#####################
+section "dccp sender"
+#####################
+
+
+option "dccp_port" -
+#~~~~~~~~~~~~~~~~~~~
+"port for dccp streaming"
+int typestr="portnumber"
+default="8000"
+optional
+details="
+       See http_port for details.
+"
+
+option "dccp_default_deny" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"make the dccp ACL a whitelist"
+flag off
+details="
+       See http_default_deny for details.
+"
+
+option "dccp_access" -
+#~~~~~~~~~~~~~~~~~~~~~
+"add an entry to the dccp ACL"
+string typestr="a.b.c.d/n"
+optional
+multiple
+details="
+       See http_access for details.
+"
+
+option "dccp_max_clients" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~
+"maximal number of connections"
+int typestr="number"
+default="-1"
+optional
+details="
+       See http_max_clients for details.
+"
+
+option "dccp_max_slice_size" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"Upper bound for the FEC slice size"
+int typestr = "size"
+optional
+default = "0"
+details = "
+       If this value is non-positive (the default) the dccp sender
+       uses the maximum packet size (MPS) of the connection as the
+       slice size. The MPS is a network parameter and depends on
+       the path maximum transmission unit (path MTU) of an incoming
+       connection, i.e. on the largest packet size that can be
+       transmitted without causing fragmentation.
+
+       This option allows to use a value less than the MPS in order
+       to fine-tune application performance. Values greater than
+       the MPS of an incoming connection can not be set.
+"
+
+option "dccp_data_slices_per_group" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"The number of non-redundant slices per FEC group"
+int typestr = "num"
+optional
+default = "3"
+details = "
+       This determines the number of slices in each FEC group that are
+       necessary to decode the group. The given number must be smaller
+       than the value of the dccp_slices_per_group option below.
+
+       Note that the duration of a FEC group is proportional to the
+       product dccp_max_slice_size * dccp_data_slices_per_group.
+"
+
+option "dccp_slices_per_group" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"The total number of slices per FEC group"
+int typestr = "num"
+optional
+default = "4"
+details = "
+       This value must be larger than the value given for above
+       dccp_data_slices_per_group above. The difference being the
+       number of redundant slices per group, i.e.  the number of
+       data packets that may be lost without causing interruptions
+       of the resulting audio stream.
+
+       Increase this value if for lossy networks.
+"
+
+####################
+section "udp sender"
+####################
+
+option "udp_target" -
+#~~~~~~~~~~~~~~~~~~~~
+"add udp target with optional port"
+string typestr="host[:port]"
+optional
+multiple
+details="
+       Add given host/port to the list of targets. The 'host' argument
+       can be either an IPv4/v6 address or hostname (RFC 3986 syntax).
+       The 'port' argument is an optional port number. If the 'port'
+       part is absent, the 'udp_default_port' value is used.
+
+       The following examples are possible targets:
+       '10.10.1.2:8000' (host:port); '10.10.1.2' (with default port);
+       '224.0.1.38:1500' (IPv4 multicast); 'localhost:8001' (hostname
+       with port); '[::1]:8001' (IPv6 localhost); '[badc0de::1]' (IPv6
+       host with default port); '[FF00::beef]:1500' (IPv6 multicast).
+
+       This option can be given multiple times, for multiple targets.
+"
+
+option "udp_no_autostart" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~
+"do not start sending"
+flag off
+details="
+       If this option is given, udp streaming may be activated at
+       a later time by using the sender command.
+"
+
+option "udp_default_port" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~
+"udp port to send to"
+int typestr="port"
+default="8000"
+optional
+
+option "udp_mcast_iface" -
+#~~~~~~~~~~~~~~~~~~~~~~~~~~
+"outgoing udp multicast interface"
+string
+optional
+
+option "udp_header_interval" H
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+"duration for sending header"
+int typestr="ms"
+default="2000"
+optional
+details="
+       As the udp sender has no idea about connected clients it
+       sends the audio file header periodically if necessary. This
+       option is used to specify the duration of the interval between
+       sending the header. Shorter values decrease the average time
+       clients have to wait before being able to start playback,
+       but this also increases the amount network traffic. Note
+       that this affects only ogg vorbis streams as this is the only
+       audio format that needs an audio file header.
+"
+
+option "udp_ttl" t
+#~~~~~~~~~~~~~~~~~
+"set time to live value"
+int typestr="num"
+default="-1"
+optional
+details="
+       This option applies exclusively to multicast UDPv4/v6 streaming.
+
+       For the sending UDPv4 socket it sets the multicast Time-To-Live
+       value to \"num\".  Traditional TTL scope values are: 0=host,
+       1=network, 32=same site, 64=same region, 128=same continent,
+       255=unrestricted. Please note however that this scoping is not
+       a good solution: RFC 2365 e.g. presents a better alternative.
+
+       When using UDPv6 multicasting, the option sets the number of
+       multicast hops (as described in RFC 3493); a value of -1
+       allows the kernel to auto-select the hop value.
+"
+</qu>
diff --git a/m4/gengetopt/udp_recv.m4 b/m4/gengetopt/udp_recv.m4
new file mode 100644 (file)
index 0000000..4c37eac
--- /dev/null
@@ -0,0 +1,17 @@
+option "host" i
+"ip or host to receive udp packets from"
+string default="224.0.1.38"
+optional
+details="
+       The default address resolves to DANTZ.MCAST.NET and activates
+       multicast.
+"
+
+option "port" p "udp port"
+int typestr="portnumber"
+default="8000"
+optional
+
+option "iface" I "receiving udp multicast interface"
+string
+optional
diff --git a/m4/gengetopt/user.m4 b/m4/gengetopt/user.m4
new file mode 100644 (file)
index 0000000..1bd5c59
--- /dev/null
@@ -0,0 +1,21 @@
+<qu>
+option "user" u
+#~~~~~~~~~~~~~~
+"run as the given user"
+string typestr="name"
+optional
+details="
+       </qu>CURRENT_PROGRAM<qu> does not need any special privileges.
+
+       If started as root (EUID == 0) this option must
+       be given at the command line (not in the configuration
+       file) so that </qu>CURRENT_PROGRAM<qu> can drop the root
+       privileges right after parsing the command line options,
+       but before parsing the configuration file. In this case,
+       real/effective/saved UID are all set to the UID of 'name'. As
+       the configuration file is read afterwards, those options that
+       have a default value depending on the UID (e.g. the directory
+       for the configuration file) are computed by using the uid of
+       'name'. This option has no effect if </qu>CURRENT_PROGRAM<qu>
+       is started as a non-root user (i.e.  EUID != 0).
+" </qu>
diff --git a/m4/gengetopt/write.m4 b/m4/gengetopt/write.m4
new file mode 100644 (file)
index 0000000..524d724
--- /dev/null
@@ -0,0 +1,43 @@
+include(header.m4)
+include(loglevel.m4)
+
+option "writer" w
+#~~~~~~~~~~~~~~~~
+"select stream writer"
+string typestr="name"
+default="alsa (file if alsa is unsupported)"
+optional
+multiple
+details="
+       May be give multiple times. The same writer may be specified
+       more than once.
+"
+
+text "
+       The following options are only necessary for raw audio. When
+       playing wav files this information is obtained from the
+       wave header.
+"
+
+option "channels" c
+#~~~~~~~~~~~~~~~~~~
+"specify number of channels"
+int typestr = "num"
+default = "2"
+optional
+
+option "sample-rate" s
+#~~~~~~~~~~~~~~~~~~~~~
+"force given sample rate"
+int typestr = "num"
+default = "44100"
+optional
+
+option "sample-format" f
+#~~~~~~~~~~~~~~~~~~~~~~~
+"specify sample format"
+# This must match the enum sample_format of para.h
+values = "S8", "U8", "S16_LE", "S16_BE", "U16_LE", "U16_BE" enum
+default = "S16_LE"
+optional
+