From: Andre Noll Date: Sun, 22 Jul 2012 14:11:11 +0000 (+0200) Subject: Move gengetopt input files to m4 directory. X-Git-Tag: v0.4.12~33 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=2829202e393e4b0095d62739910ae56f04e83326 Move gengetopt input files to m4 directory. 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. --- diff --git a/Makefile.in b/Makefile.in index ed0b9b05..3463553c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 index 82d505b5..00000000 --- a/ggo/.gitignore +++ /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 index ba7d7901..00000000 --- a/ggo/afh.m4 +++ /dev/null @@ -1,136 +0,0 @@ -include(header.m4) - -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. -" - - -include(loglevel.m4) - - -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. -" - diff --git a/ggo/alsa_write.m4 b/ggo/alsa_write.m4 deleted file mode 100644 index d0cd4071..00000000 --- a/ggo/alsa_write.m4 +++ /dev/null @@ -1,14 +0,0 @@ -include(header.m4) - - -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\". -" - diff --git a/ggo/amp_filter.m4 b/ggo/amp_filter.m4 deleted file mode 100644 index 865df3ac..00000000 --- a/ggo/amp_filter.m4 +++ /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 index baccc57f..00000000 --- a/ggo/ao_write.m4 +++ /dev/null @@ -1,26 +0,0 @@ -include(header.m4) - - -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. -" - - diff --git a/ggo/audioc.m4 b/ggo/audioc.m4 deleted file mode 100644 index 5ecc2a92..00000000 --- a/ggo/audioc.m4 +++ /dev/null @@ -1,22 +0,0 @@ -include(header.m4) - -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 - - -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 index 9aabd575..00000000 --- a/ggo/audiod.m4 +++ /dev/null @@ -1,208 +0,0 @@ -include(header.m4) -define(CURRENT_PROGRAM,para_audiod) -define(DEFAULT_CONFIG_FILE,~/.paraslash/audiod.conf) - - -######################### -section "General options" -######################### - - -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) - - -######################## -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.. - - 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. -" - diff --git a/ggo/client.m4 b/ggo/client.m4 deleted file mode 100644 index 8ade5089..00000000 --- a/ggo/client.m4 +++ /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) - -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="" optional -option "server_port" p "port to connect" int typestr="port" default="2990" optional -option "key_file" k "(default='~/.paraslash/key.')" string typestr="filename" optional - - -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 index 63e996f3..00000000 --- a/ggo/color.m4 +++ /dev/null @@ -1,34 +0,0 @@ - - -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\" -" - - diff --git a/ggo/complete.m4 b/ggo/complete.m4 deleted file mode 100644 index 14e737cf..00000000 --- a/ggo/complete.m4 +++ /dev/null @@ -1,12 +0,0 @@ - -option "complete" - -#~~~~~~~~~~~~~~~~~~ -"print possible command line completions" - flag off - details = " - If this flag is given, CURRENT_PROGRAM 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. -" - diff --git a/ggo/compress_filter.m4 b/ggo/compress_filter.m4 deleted file mode 100644 index 74dcbc03..00000000 --- a/ggo/compress_filter.m4 +++ /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 index 318ba7a6..00000000 --- a/ggo/config_file.m4 +++ /dev/null @@ -1,14 +0,0 @@ - -option "config_file" c -#~~~~~~~~~~~~~~~~~~~~~ -"(default='DEFAULT_CONFIG_FILE')" -string typestr="filename" -optional -details=" - CURRENT_PROGRAM 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. -" - diff --git a/ggo/daemon.m4 b/ggo/daemon.m4 deleted file mode 100644 index b4e842ac..00000000 --- a/ggo/daemon.m4 +++ /dev/null @@ -1,11 +0,0 @@ - -option "daemon" d -#~~~~~~~~~~~~~~~~ -"run as background daemon" -flag off -dependon="logfile" -details=" - Note that CURRENT_PROGRAM refuses to start in daemon mode if no - logfile was specified. -" - diff --git a/ggo/dccp_recv.m4 b/ggo/dccp_recv.m4 deleted file mode 100644 index 80d31233..00000000 --- a/ggo/dccp_recv.m4 +++ /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 index 80f8b73c..00000000 --- a/ggo/fade.m4 +++ /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 index 56c44f7a..00000000 --- a/ggo/file_write.m4 +++ /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 index 9df0f3f2..00000000 --- a/ggo/filter.m4 +++ /dev/null @@ -1,21 +0,0 @@ -include(header.m4) -include(loglevel.m4) - -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' -" - diff --git a/ggo/fsck.m4 b/ggo/fsck.m4 deleted file mode 100644 index d593058e..00000000 --- a/ggo/fsck.m4 +++ /dev/null @@ -1,43 +0,0 @@ -include(header.m4) -include(loglevel.m4) - - -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 - - diff --git a/ggo/group.m4 b/ggo/group.m4 deleted file mode 100644 index 2a59ad9a..00000000 --- a/ggo/group.m4 +++ /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 index 895229b2..00000000 --- a/ggo/gui.m4 +++ /dev/null @@ -1,67 +0,0 @@ -include(header.m4) -define(CURRENT_PROGRAM,para_gui) -define(DEFAULT_CONFIG_FILE,~/.paraslash/gui.conf) - - -######################### -section "General options" -######################### - - -include(config_file.m4) -include(loglevel.m4) - - -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. -" - diff --git a/ggo/header.m4 b/ggo/header.m4 deleted file mode 100644 index c4231879..00000000 --- a/ggo/header.m4 +++ /dev/null @@ -1 +0,0 @@ -changequote(,) diff --git a/ggo/history_file.m4 b/ggo/history_file.m4 deleted file mode 100644 index 932d88bf..00000000 --- a/ggo/history_file.m4 +++ /dev/null @@ -1,12 +0,0 @@ - -option "history_file" - -#~~~~~~~~~~~~~~~~~~~~~~ -"(default='DEFAULT_HISTORY_FILE')" -string typestr = "filename" -optional -details = " - If CURRENT_PROGRAM runs in interactive mode, it reads the history - file on startup. Upon exit, the in-memory history is appended - to the history file. -" - diff --git a/ggo/http_recv.m4 b/ggo/http_recv.m4 deleted file mode 100644 index 14ae99ab..00000000 --- a/ggo/http_recv.m4 +++ /dev/null @@ -1,19 +0,0 @@ -include(header.m4) - - -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 - diff --git a/ggo/log_timing.m4 b/ggo/log_timing.m4 deleted file mode 100644 index ac0ea841..00000000 --- a/ggo/log_timing.m4 +++ /dev/null @@ -1,12 +0,0 @@ - -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. -" - diff --git a/ggo/logfile.m4 b/ggo/logfile.m4 deleted file mode 100644 index bb102939..00000000 --- a/ggo/logfile.m4 +++ /dev/null @@ -1,11 +0,0 @@ - -option "logfile" L -#~~~~~~~~~~~~~~~~~ -"where to write log output" -string typestr="filename" -optional -details=" - If this option is not given, CURRENT_PROGRAM writes the log - messages to to stderr -" - diff --git a/ggo/loglevel.m4 b/ggo/loglevel.m4 deleted file mode 100644 index 162d030b..00000000 --- a/ggo/loglevel.m4 +++ /dev/null @@ -1,22 +0,0 @@ - -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. -" - - diff --git a/ggo/makefile b/ggo/makefile deleted file mode 100644 index 4bc29a0a..00000000 --- a/ggo/makefile +++ /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) diff --git a/ggo/mp3dec_filter.m4 b/ggo/mp3dec_filter.m4 deleted file mode 100644 index c02f1583..00000000 --- a/ggo/mp3dec_filter.m4 +++ /dev/null @@ -1,14 +0,0 @@ -include(header.m4) - - -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. -" - diff --git a/ggo/oss_write.m4 b/ggo/oss_write.m4 deleted file mode 100644 index 351561cd..00000000 --- a/ggo/oss_write.m4 +++ /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 index bee16d9e..00000000 --- a/ggo/osx_write.m4 +++ /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 index 7553e957..00000000 --- a/ggo/prebuffer_filter.m4 +++ /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 index 9702e12b..00000000 --- a/ggo/recv.m4 +++ /dev/null @@ -1,16 +0,0 @@ -include(header.m4) -include(loglevel.m4) - - -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' -" - diff --git a/ggo/server.m4 b/ggo/server.m4 deleted file mode 100644 index 8731561c..00000000 --- a/ggo/server.m4 +++ /dev/null @@ -1,374 +0,0 @@ -include(header.m4) -define(CURRENT_PROGRAM,para_server) -define(DEFAULT_CONFIG_FILE,~/.paraslash/server.conf) - - -######################### -section "General options" -######################### - - -include(loglevel.m4) -include(log_timing.m4) -include(color.m4) -include(daemon.m4) -include(user.m4) -include(group.m4) - - -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" -############################# - - -include(logfile.m4) -include(config_file.m4) - - -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="/" -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. -" - diff --git a/ggo/udp_recv.m4 b/ggo/udp_recv.m4 deleted file mode 100644 index 4c37eace..00000000 --- a/ggo/udp_recv.m4 +++ /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 index 1bd5c59a..00000000 --- a/ggo/user.m4 +++ /dev/null @@ -1,21 +0,0 @@ - -option "user" u -#~~~~~~~~~~~~~~ -"run as the given user" -string typestr="name" -optional -details=" - CURRENT_PROGRAM 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 CURRENT_PROGRAM 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 CURRENT_PROGRAM - is started as a non-root user (i.e. EUID != 0). -" diff --git a/ggo/write.m4 b/ggo/write.m4 deleted file mode 100644 index 524d7248..00000000 --- a/ggo/write.m4 +++ /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 index 00000000..ba7d7901 --- /dev/null +++ b/m4/gengetopt/afh.m4 @@ -0,0 +1,136 @@ +include(header.m4) + +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. +" + + +include(loglevel.m4) + + +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. +" + diff --git a/m4/gengetopt/alsa_write.m4 b/m4/gengetopt/alsa_write.m4 new file mode 100644 index 00000000..d0cd4071 --- /dev/null +++ b/m4/gengetopt/alsa_write.m4 @@ -0,0 +1,14 @@ +include(header.m4) + + +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\". +" + diff --git a/m4/gengetopt/amp_filter.m4 b/m4/gengetopt/amp_filter.m4 new file mode 100644 index 00000000..865df3ac --- /dev/null +++ b/m4/gengetopt/amp_filter.m4 @@ -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 index 00000000..baccc57f --- /dev/null +++ b/m4/gengetopt/ao_write.m4 @@ -0,0 +1,26 @@ +include(header.m4) + + +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. +" + + diff --git a/m4/gengetopt/audioc.m4 b/m4/gengetopt/audioc.m4 new file mode 100644 index 00000000..5ecc2a92 --- /dev/null +++ b/m4/gengetopt/audioc.m4 @@ -0,0 +1,22 @@ +include(header.m4) + +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 + + +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 index 00000000..9aabd575 --- /dev/null +++ b/m4/gengetopt/audiod.m4 @@ -0,0 +1,208 @@ +include(header.m4) +define(CURRENT_PROGRAM,para_audiod) +define(DEFAULT_CONFIG_FILE,~/.paraslash/audiod.conf) + + +######################### +section "General options" +######################### + + +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) + + +######################## +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.. + + 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. +" + diff --git a/m4/gengetopt/client.m4 b/m4/gengetopt/client.m4 new file mode 100644 index 00000000..8ade5089 --- /dev/null +++ b/m4/gengetopt/client.m4 @@ -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) + +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="" optional +option "server_port" p "port to connect" int typestr="port" default="2990" optional +option "key_file" k "(default='~/.paraslash/key.')" string typestr="filename" optional + + +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 index 00000000..63e996f3 --- /dev/null +++ b/m4/gengetopt/color.m4 @@ -0,0 +1,34 @@ + + +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\" +" + + diff --git a/m4/gengetopt/complete.m4 b/m4/gengetopt/complete.m4 new file mode 100644 index 00000000..14e737cf --- /dev/null +++ b/m4/gengetopt/complete.m4 @@ -0,0 +1,12 @@ + +option "complete" - +#~~~~~~~~~~~~~~~~~~ +"print possible command line completions" + flag off + details = " + If this flag is given, CURRENT_PROGRAM 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. +" + diff --git a/m4/gengetopt/compress_filter.m4 b/m4/gengetopt/compress_filter.m4 new file mode 100644 index 00000000..74dcbc03 --- /dev/null +++ b/m4/gengetopt/compress_filter.m4 @@ -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 index 00000000..318ba7a6 --- /dev/null +++ b/m4/gengetopt/config_file.m4 @@ -0,0 +1,14 @@ + +option "config_file" c +#~~~~~~~~~~~~~~~~~~~~~ +"(default='DEFAULT_CONFIG_FILE')" +string typestr="filename" +optional +details=" + CURRENT_PROGRAM 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. +" + diff --git a/m4/gengetopt/daemon.m4 b/m4/gengetopt/daemon.m4 new file mode 100644 index 00000000..b4e842ac --- /dev/null +++ b/m4/gengetopt/daemon.m4 @@ -0,0 +1,11 @@ + +option "daemon" d +#~~~~~~~~~~~~~~~~ +"run as background daemon" +flag off +dependon="logfile" +details=" + Note that CURRENT_PROGRAM refuses to start in daemon mode if no + logfile was specified. +" + diff --git a/m4/gengetopt/dccp_recv.m4 b/m4/gengetopt/dccp_recv.m4 new file mode 100644 index 00000000..80d31233 --- /dev/null +++ b/m4/gengetopt/dccp_recv.m4 @@ -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 index 00000000..80f8b73c --- /dev/null +++ b/m4/gengetopt/fade.m4 @@ -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 index 00000000..56c44f7a --- /dev/null +++ b/m4/gengetopt/file_write.m4 @@ -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 index 00000000..9df0f3f2 --- /dev/null +++ b/m4/gengetopt/filter.m4 @@ -0,0 +1,21 @@ +include(header.m4) +include(loglevel.m4) + +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' +" + diff --git a/m4/gengetopt/fsck.m4 b/m4/gengetopt/fsck.m4 new file mode 100644 index 00000000..d593058e --- /dev/null +++ b/m4/gengetopt/fsck.m4 @@ -0,0 +1,43 @@ +include(header.m4) +include(loglevel.m4) + + +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 + + diff --git a/m4/gengetopt/group.m4 b/m4/gengetopt/group.m4 new file mode 100644 index 00000000..2a59ad9a --- /dev/null +++ b/m4/gengetopt/group.m4 @@ -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 index 00000000..895229b2 --- /dev/null +++ b/m4/gengetopt/gui.m4 @@ -0,0 +1,67 @@ +include(header.m4) +define(CURRENT_PROGRAM,para_gui) +define(DEFAULT_CONFIG_FILE,~/.paraslash/gui.conf) + + +######################### +section "General options" +######################### + + +include(config_file.m4) +include(loglevel.m4) + + +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. +" + diff --git a/m4/gengetopt/header.m4 b/m4/gengetopt/header.m4 new file mode 100644 index 00000000..c4231879 --- /dev/null +++ b/m4/gengetopt/header.m4 @@ -0,0 +1 @@ +changequote(,) diff --git a/m4/gengetopt/history_file.m4 b/m4/gengetopt/history_file.m4 new file mode 100644 index 00000000..932d88bf --- /dev/null +++ b/m4/gengetopt/history_file.m4 @@ -0,0 +1,12 @@ + +option "history_file" - +#~~~~~~~~~~~~~~~~~~~~~~ +"(default='DEFAULT_HISTORY_FILE')" +string typestr = "filename" +optional +details = " + If CURRENT_PROGRAM runs in interactive mode, it reads the history + file on startup. Upon exit, the in-memory history is appended + to the history file. +" + diff --git a/m4/gengetopt/http_recv.m4 b/m4/gengetopt/http_recv.m4 new file mode 100644 index 00000000..14ae99ab --- /dev/null +++ b/m4/gengetopt/http_recv.m4 @@ -0,0 +1,19 @@ +include(header.m4) + + +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 + diff --git a/m4/gengetopt/log_timing.m4 b/m4/gengetopt/log_timing.m4 new file mode 100644 index 00000000..ac0ea841 --- /dev/null +++ b/m4/gengetopt/log_timing.m4 @@ -0,0 +1,12 @@ + +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. +" + diff --git a/m4/gengetopt/logfile.m4 b/m4/gengetopt/logfile.m4 new file mode 100644 index 00000000..bb102939 --- /dev/null +++ b/m4/gengetopt/logfile.m4 @@ -0,0 +1,11 @@ + +option "logfile" L +#~~~~~~~~~~~~~~~~~ +"where to write log output" +string typestr="filename" +optional +details=" + If this option is not given, CURRENT_PROGRAM writes the log + messages to to stderr +" + diff --git a/m4/gengetopt/loglevel.m4 b/m4/gengetopt/loglevel.m4 new file mode 100644 index 00000000..162d030b --- /dev/null +++ b/m4/gengetopt/loglevel.m4 @@ -0,0 +1,22 @@ + +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. +" + + diff --git a/m4/gengetopt/makefile b/m4/gengetopt/makefile new file mode 100644 index 00000000..8b0c1f8d --- /dev/null +++ b/m4/gengetopt/makefile @@ -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,,$( $@ diff --git a/m4/gengetopt/mp3dec_filter.m4 b/m4/gengetopt/mp3dec_filter.m4 new file mode 100644 index 00000000..c02f1583 --- /dev/null +++ b/m4/gengetopt/mp3dec_filter.m4 @@ -0,0 +1,14 @@ +include(header.m4) + + +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. +" + diff --git a/m4/gengetopt/oss_write.m4 b/m4/gengetopt/oss_write.m4 new file mode 100644 index 00000000..351561cd --- /dev/null +++ b/m4/gengetopt/oss_write.m4 @@ -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 index 00000000..bee16d9e --- /dev/null +++ b/m4/gengetopt/osx_write.m4 @@ -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 index 00000000..7553e957 --- /dev/null +++ b/m4/gengetopt/prebuffer_filter.m4 @@ -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 index 00000000..9702e12b --- /dev/null +++ b/m4/gengetopt/recv.m4 @@ -0,0 +1,16 @@ +include(header.m4) +include(loglevel.m4) + + +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' +" + diff --git a/m4/gengetopt/server.m4 b/m4/gengetopt/server.m4 new file mode 100644 index 00000000..8731561c --- /dev/null +++ b/m4/gengetopt/server.m4 @@ -0,0 +1,374 @@ +include(header.m4) +define(CURRENT_PROGRAM,para_server) +define(DEFAULT_CONFIG_FILE,~/.paraslash/server.conf) + + +######################### +section "General options" +######################### + + +include(loglevel.m4) +include(log_timing.m4) +include(color.m4) +include(daemon.m4) +include(user.m4) +include(group.m4) + + +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" +############################# + + +include(logfile.m4) +include(config_file.m4) + + +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="/" +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. +" + diff --git a/m4/gengetopt/udp_recv.m4 b/m4/gengetopt/udp_recv.m4 new file mode 100644 index 00000000..4c37eace --- /dev/null +++ b/m4/gengetopt/udp_recv.m4 @@ -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 index 00000000..1bd5c59a --- /dev/null +++ b/m4/gengetopt/user.m4 @@ -0,0 +1,21 @@ + +option "user" u +#~~~~~~~~~~~~~~ +"run as the given user" +string typestr="name" +optional +details=" + CURRENT_PROGRAM 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 CURRENT_PROGRAM 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 CURRENT_PROGRAM + is started as a non-root user (i.e. EUID != 0). +" diff --git a/m4/gengetopt/write.m4 b/m4/gengetopt/write.m4 new file mode 100644 index 00000000..524d7248 --- /dev/null +++ b/m4/gengetopt/write.m4 @@ -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 +