From: Andre Noll Date: Fri, 23 Aug 2013 17:35:56 +0000 (+0200) Subject: Merge branch 't/web_improvements' X-Git-Tag: v0.5.0~1 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=d9e05a6585d795e44847608a8a6ee424a7604b74;hp=329719eb05e8bbe1c264cce9e4d88a36f702f8c7 Merge branch 't/web_improvements' The new pages have been tested on slnx with no problems, so they're ready for prime time. 329719 web: Move menu down a bit. c6ac6c web: Make image rule global. c53634 Replace main page by NEWS. 3c2dfc NEWS: Replace "to be announced" text. c2ea0c web: Add tarball and signature link of recent release to NEWS. b35afc web: Adjust sizes of monospace fonts. 7fb28a web: Avoid gray area on gitweb page. f3f978 web: Move important parts of the style sheet to the top of the file. 57058e web: Remove some duplicate rules in para.css. 5005fb web: Combine the two .css files. d74c89 web: Add header to gitweb and API reference sites. 076b70 web: Increase size of log messages and diffs. 0384fd web: Unify link colors. 893669 web: Fix gitweb link on doxygen pages. 607d79 web: Unify
elements. 40ceca web: Remove valign tag in header files. 37bfc1 web: Further unify header.html, header2.html and gitweb_header.html. 197add web: Unify css rules for tables. 21422a web: Remove horizontal line at the top of the page. 53963d web: Remove style element in html. 4c061d web: Make the body selector of the two css files consistent. f9fadc web: Use lower-case css selectors. 22fb31 web: Increase font size. 2f201d web: css whitespace fixes. 51445c web: Remove commented-out sections of css files. 71d445 web: Remove border="0" tag. 02c1a5 web: Don't set border, cellpadding and cellspacing. 6e0b01 web: Remove basefont tag. 42a4cd Update README. 2210c6 web: Remove explanation of the paraslash acronym. --- diff --git a/.gitignore b/.gitignore index 9091a9c2..d340f207 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ TODO *_command_list.h *_command_list.man paraslash-git.tar.bz2 -skencil/overview.pdf +web/dia/overview.pdf *.swp error2.h web_sync diff --git a/FEATURES b/FEATURES index 6ad420df..395d0f15 100644 --- a/FEATURES +++ b/FEATURES @@ -5,7 +5,7 @@ Features * Runs on Linux, Mac OS, FreeBSD, NetBSD, Solaris and probably other Unixes - * Mp3, ogg/vorbis, ogg/speex, aac (m4a), wma and flac support + * Mp3, ogg/vorbis, ogg/speex, aac (m4a), wma, flac and ogg/opus support * Native Alsa, OSS, CoreAudio output support * Support for ESD, Pulseaudio, AIX, Solaris, IRIX through libao * Local or remote http, dccp and udp network audio streaming diff --git a/Makefile.in b/Makefile.in index f82afd7b..cf8b9f71 100644 --- a/Makefile.in +++ b/Makefile.in @@ -8,7 +8,7 @@ MANDIR := @datarootdir@/man/man1 PACKAGE_VERSION := @PACKAGE_VERSION@ PACKAGE_STRING := @PACKAGE_STRING@ install_sh := @install_sh@ -executables := @executables@ +executables := $(addprefix para_, @executables@) ggo_descriptions_declared := @ggo_descriptions_declared@ GENGETOPT := @gengetopt@ @@ -34,6 +34,7 @@ object_dir := $(build_dir)/objects dep_dir := $(build_dir)/deps man_dir := $(build_dir)/man/man1 cmdline_dir := $(build_dir)/cmdline +m4depdir := $(build_dir)/m4deps DEBUG_CPPFLAGS += -g -Wunused -Wundef -W DEBUG_CPPFLAGS += -Wredundant-decls @@ -80,13 +81,12 @@ CPPFLAGS += @osl_cppflags@ LDFLAGS += @clock_gettime_ldflags@ -man_pages := $(patsubst %, $(man_dir)/%.1, @executables@) +man_pages := $(patsubst %, $(man_dir)/%.1, $(executables)) autocrap := config.h.in configure tarball_pfx := @PACKAGE_TARNAME@-$(PACKAGE_VERSION) tarball_delete := $(addprefix $(tarball_pfx)/,\ - web .changelog_before_cvs .changelog_cvs .gitignore\ - skencil) + web .changelog_before_cvs .changelog_cvs .gitignore) tarball := @PACKAGE_TARNAME@-$(PACKAGE_VERSION).tar.bz2 # To put more focus on warnings, be less verbose as default @@ -98,12 +98,12 @@ else endif .PHONY: dep all clean distclean maintainer-clean install man tarball -all: dep @executables@ $(man_pages) +all: dep $(executables) $(man_pages) dep: $(deps) man: $(man_pages) tarball: $(tarball) -$(object_dir) $(man_dir) $(ggo_dir) $(cmdline_dir) $(dep_dir): +$(object_dir) $(man_dir) $(ggo_dir) $(cmdline_dir) $(dep_dir) $(m4depdir): $(Q) $(MKDIR_P) $@ -include $(m4_ggo_dir)/makefile @@ -230,6 +230,7 @@ all_objs := @recv_objs@ @filter_objs@ @client_objs@ @gui_objs@ \ @audiod_objs@ @audioc_objs@ @fade_objs@ @server_objs@ \ @write_objs@ @afh_objs@ @play_objs@ deps := $(addprefix $(dep_dir)/, $(all_objs:.o=.d)) +m4_deps := $(addprefix $(m4depdir)/, $(addsuffix .m4d, @executables@)) recv_objs := $(addprefix $(object_dir)/, @recv_objs@) filter_objs := $(addprefix $(object_dir)/, @filter_objs@) @@ -245,6 +246,7 @@ play_objs := $(addprefix $(object_dir)/, @play_objs@) ifeq ($(findstring clean, $(MAKECMDGOALS)),) -include $(deps) +-include $(m4_deps) endif para_recv: $(recv_objs) @@ -293,7 +295,7 @@ para_play: $(play_objs) clean: @[ -z "$(Q)" ] || echo 'CLEAN' - $(Q) rm -f @executables@ + $(Q) rm -f $(executables) $(Q) rm -rf $(object_dir) clean2: clean @@ -307,14 +309,12 @@ distclean: clean2 test-clean $(Q) rm -f GPATH GRTAGS GSYMS GTAGS maintainer-clean: distclean - rm -f *.tar.bz2 \ - config.h configure \ - config.h.in skencil/*.pdf skencil/*.ps + rm -f *.tar.bz2 config.h configure config.h.in rm -rf web_sync install: all man $(MKDIR_P) $(BINDIR) $(MANDIR) - $(install_sh) -s -m 755 @executables@ $(BINDIR) + $(install_sh) -s -m 755 $(executables) $(BINDIR) $(install_sh) -m 644 $(man_pages) $(MANDIR) $(MKDIR_P) $(VARDIR) >/dev/null 2>&1 || true # not fatal, so don't complain diff --git a/NEWS b/NEWS index 8c775f64..0ce6ecb1 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,16 @@ Noteworthy changes recently merged to master - Addblob commands can produce output. - The stat command no longer sends garbage when para_server was compiled against libgcrypt. + - Dependencies for gengetopt files are computed automatically. + This eliminates a constant source of build bugs. + - The setatt command now accepts file name patterns rather than only + path names. + - overview.pdf is now based on dia, a simple diagram creation program. + The new version is much more detailed and contains descriptions of + the various programs of the paraslash package. + - The separator of all multi-word options has been changed from + underscore to dash. For example --log_color becomes --log-color. + - Overhauled web pages and the new logo. -------------------------------------- 0.4.13 (2013-07-29) "spectral gravity" diff --git a/afs.c b/afs.c index 49ce13eb..2f9df845 100644 --- a/afs.c +++ b/afs.c @@ -804,7 +804,7 @@ static void command_pre_select(struct sched *s, struct task *t) * \return Zero if \a buf is \p NULL or \a size is zero. Negative on errors, * and positive on success. */ -int pass_buffer_as_shm(int fd, uint8_t band, char *buf, size_t size) +int pass_buffer_as_shm(int fd, uint8_t band, const char *buf, size_t size) { int ret, shmid; void *shm; diff --git a/afs.h b/afs.h index b415bfec..a63968f1 100644 --- a/afs.h +++ b/afs.h @@ -207,7 +207,7 @@ typedef void callback_function(int fd, const struct osl_object *); */ typedef int callback_result_handler(struct osl_object *result, uint8_t band, void *private); int afs_cb_result_handler(struct osl_object *result, uint8_t band, void *private); -int pass_buffer_as_shm(int fd, uint8_t band, char *buf, size_t size); +int pass_buffer_as_shm(int fd, uint8_t band, const char *buf, size_t size); /** Structure passed to the AFS max_size handler. */ struct afs_max_size_handler_data { diff --git a/aft.c b/aft.c index adc9a6f2..377740d1 100644 --- a/aft.c +++ b/aft.c @@ -2471,6 +2471,108 @@ int com_cpsi(struct command_context *cc) return ret; } +struct change_atts_data { + uint64_t add_mask, del_mask; + struct para_buffer pb; +}; + +static int change_atts(__a_unused struct osl_table *table, + struct osl_row *row, __a_unused const char *name, void *data) +{ + int ret; + struct osl_object obj; + struct afs_info old_afsi, new_afsi; + struct afsi_change_event_data aced = { + .aft_row = row, + .old_afsi = &old_afsi + }; + struct change_atts_data *cad = data; + + ret = get_afsi_object_of_row(row, &obj); + if (ret < 0) + return ret; + ret = load_afsi(&old_afsi, &obj); + if (ret < 0) + return ret; + new_afsi = old_afsi; + new_afsi.attributes |= cad->add_mask; + new_afsi.attributes &= ~cad->del_mask; + save_afsi(&new_afsi, &obj); /* in-place update */ + afs_event(AFSI_CHANGE, &cad->pb, &aced); + return 1; +} + +static void com_setatt_callback(int fd, const struct osl_object *query) +{ + char *p; + int ret; + size_t len; + struct change_atts_data cad = { + .pb = { + .max_size = shm_get_shmmax(), + .max_size_handler = afs_max_size_handler, + .private_data = &(struct afs_max_size_handler_data) { + .fd = fd, + .band = SBD_OUTPUT + } + } + }; + struct pattern_match_data pmd = { + .table = audio_file_table, + .loop_col_num = AFTCOL_HASH, + .match_col_num = AFTCOL_PATH, + .pm_flags = PM_SKIP_EMPTY_NAME, + .data = &cad, + .action = change_atts + }; + + for (p = query->data; p < (char *)query->data + query->size; p += len + 1) { + char c; + unsigned char bitnum; + + len = strlen(p); + ret = -E_ATTR_SYNTAX; + if (len == 0) + goto out; + c = p[len - 1]; + if (c != '+' && c != '-') + break; + p[len - 1] = '\0'; + ret = get_attribute_bitnum_by_name(p, &bitnum); + if (ret < 0) + goto out; + if (c == '+') + cad.add_mask |= (1UL << bitnum); + else + cad.del_mask |= (1UL << bitnum); + } + ret = -E_ATTR_SYNTAX; + if (!cad.add_mask && !cad.del_mask) + goto out; + pmd.patterns.data = p; + assert(p < (char *)query->data + query->size); + pmd.patterns.size = (char *)query->data + query->size - p; + ret = for_each_matching_row(&pmd); + if (ret < 0) + goto out; + if (pmd.num_matches == 0) + para_printf(&cad.pb, "no matches\n"); +out: + if (ret < 0) + para_printf(&cad.pb, "%s\n", para_strerror(-ret)); + if (cad.pb.offset) + pass_buffer_as_shm(fd, SBD_OUTPUT, cad.pb.buf, cad.pb.offset); + free(cad.pb.buf); +} + +int com_setatt(struct command_context *cc) +{ + if (cc->argc < 3) + return -E_ATTR_SYNTAX; + return send_standard_callback_request(cc->argc - 1, cc->argv + 1, + com_setatt_callback, afs_cb_result_handler, cc); +} + static void afs_stat_callback(int fd, const struct osl_object *query) { int *parser_friendly = query->data; diff --git a/attribute.c b/attribute.c index 5a3861be..867e24b9 100644 --- a/attribute.c +++ b/attribute.c @@ -216,78 +216,6 @@ int com_lsatt(struct command_context *cc) return ret; } -static void com_setatt_callback(__a_unused int fd, const struct osl_object *query) -{ - char *p; - uint64_t add_mask = 0, del_mask = 0; - int ret; - size_t len; - struct osl_object obj; - struct osl_row *row; - - for (p = query->data; p < (char *)query->data + query->size; p += len + 1) { - char c; - - len = strlen(p); - ret = -E_ATTR_SYNTAX; - if (!*p) - goto out; - c = p[len - 1]; - if (c != '+' && c != '-') - break; - p[len - 1] = '\0'; - obj.data = p; - obj.size = len + 1; - ret = osl(osl_get_row(attribute_table, ATTCOL_NAME, &obj, &row)); - if (ret < 0) - goto out; - ret = osl(osl_get_object(attribute_table, row, ATTCOL_BITNUM, - &obj)); - if (ret < 0) - goto out; - if (c == '+') - add_mask |= (1UL << *(unsigned char *)obj.data); - else - del_mask |= (1UL << *(unsigned char *)obj.data); - } - ret = -E_ATTR_SYNTAX; - if (!add_mask && !del_mask) - goto out; - PARA_DEBUG_LOG("masks: %llx:%llx\n",(long long unsigned)add_mask, - (long long unsigned)del_mask); - for (; p < (char *)query->data + query->size; p += len + 1) { /* TODO: fnmatch */ - struct afs_info old_afsi, new_afsi; - struct afsi_change_event_data aced = {.old_afsi = &old_afsi}; - - len = strlen(p); - ret = aft_get_row_of_path(p, &aced.aft_row); - if (ret < 0) - goto out; - ret = get_afsi_object_of_row(aced.aft_row, &obj); - if (ret < 0) - goto out; - ret = load_afsi(&old_afsi, &obj); - if (ret < 0) - goto out; - new_afsi = old_afsi; - new_afsi.attributes |= add_mask; - new_afsi.attributes &= ~del_mask; - save_afsi(&new_afsi, &obj); /* in-place update */ - afs_event(AFSI_CHANGE, NULL, &aced); - } -out: - if (ret < 0) - PARA_NOTICE_LOG("%s\n", para_strerror(-ret)); -} - -int com_setatt(struct command_context *cc) -{ - if (cc->argc < 3) - return -E_ATTR_SYNTAX; - return send_standard_callback_request(cc->argc - 1, cc->argv + 1, - com_setatt_callback, NULL, NULL); -} - struct addatt_event_data { const char *name; unsigned char bitnum; diff --git a/configure.ac b/configure.ac index b3332c67..87e41d71 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,6 @@ AC_CONFIG_HEADER([config.h]) AC_CONFIG_FILES([Makefile]) AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)]) -AC_DEFUN([add_para],[$(for i in $@; do printf "para_$i "; done)]) AC_DEFUN([objlist_to_errlist],[$(for i in $@; do printf "DEFINE_ERRLIST($(echo $i| tr 'a-z' 'A-Z'));"; done) [const char **para_errlist[[]]] = {$(for i in $@; do printf "PARA_ERRLIST($(echo $i | tr 'a-z' 'A-Z')), "; done) }]) AC_PATH_PROG(UNAMEPATH, uname, no) if test "$UNAMEPATH" = "no"; then @@ -1325,7 +1324,7 @@ AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result], AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers", [formats supported by para_server and para_afh]) -AC_SUBST(executables, add_para($executables)) +AC_SUBST(executables) recv_objs="$recv_cmdline_objs $recv_errlist_objs" filter_objs="$filter_cmdline_objs $filter_errlist_objs" diff --git a/m4/gengetopt/afh.m4 b/m4/gengetopt/afh.m4 index f8e29fea..ebc1d1cf 100644 --- a/m4/gengetopt/afh.m4 +++ b/m4/gengetopt/afh.m4 @@ -6,7 +6,7 @@ include(header.m4) include(loglevel.m4) -option "chunk_table" c +option "chunk-table" c #~~~~~~~~~~~~~~~~~~~~~ "print also the chunk table" flag off @@ -27,7 +27,7 @@ option "parser-friendly" p flag off details = " Currently this option only affects the format of the chunk table, - so it has no effect if --chunk_table is not given. + so it has no effect if --chunk-table is not given. The human-readable output (the default) consists of one output line per chunk and the output contains also the chunk number, diff --git a/m4/gengetopt/afh_recv.m4 b/m4/gengetopt/afh_recv.m4 index f4da9d99..6fdef59e 100644 --- a/m4/gengetopt/afh_recv.m4 +++ b/m4/gengetopt/afh_recv.m4 @@ -31,7 +31,7 @@ details = " 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 + 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. @@ -43,7 +43,7 @@ option "end-chunk" e int typestr = "chunk_num" optional details = " - For the chunk_num argument the same rules as for --begin_chunk + For the chunk_num argument the same rules as for --begin-chunk apply. The default is to write up to the last chunk. " diff --git a/m4/gengetopt/audiod.m4 b/m4/gengetopt/audiod.m4 index 7bae3435..5fc15893 100644 --- a/m4/gengetopt/audiod.m4 +++ b/m4/gengetopt/audiod.m4 @@ -80,7 +80,7 @@ details=" instructed to use also \"filename\" for connecting para_audiod. " -option "user_allow" - +option "user-allow" - #~~~~~~~~~~~~~~~~~~~~ "allow this uid" int typestr="uid" @@ -98,7 +98,7 @@ details=" to connect to para_audiod. " -option "clock_diff_count" - +option "clock-diff-count" - #~~~~~~~~~~~~~~~~~~~~~~~~~~ "sync clock on startup" int typestr="count" @@ -195,7 +195,7 @@ details=" " -option "stream_delay" - +option "stream-delay" - #~~~~~~~~~~~~~~~~~~~~~~ "time for client sync" int typestr="milliseconds" diff --git a/m4/gengetopt/client.m4 b/m4/gengetopt/client.m4 index f0bbc0bd..5b4c8ec8 100644 --- a/m4/gengetopt/client.m4 +++ b/m4/gengetopt/client.m4 @@ -9,8 +9,8 @@ define(DEFAULT_HISTORY_FILE,~/.paraslash/client.history) 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 +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) diff --git a/m4/gengetopt/color.m4 b/m4/gengetopt/color.m4 index 63e996f3..eb081786 100644 --- a/m4/gengetopt/color.m4 +++ b/m4/gengetopt/color.m4 @@ -8,7 +8,7 @@ values = "yes","no","auto" default = "auto" optional -option "log_color" - +option "log-color" - #~~~~~~~~~~~~~~~~~~~ "select a color for one type of log message" string typestr="color_spec" @@ -26,9 +26,9 @@ details=" Examples: - --log_color \"debug:green\" - --log_color \"info:yellow bold\" - --log_color \"notice:white red bold\" + --log-color \"debug:green\" + --log-color \"info:yellow bold\" + --log-color \"notice:white red bold\" " diff --git a/m4/gengetopt/compress_filter.m4 b/m4/gengetopt/compress_filter.m4 index 8c701a03..772bdb2e 100644 --- a/m4/gengetopt/compress_filter.m4 +++ b/m4/gengetopt/compress_filter.m4 @@ -26,7 +26,7 @@ option "inertia" i default="6" optional -option "target_level" t +option "target-level" t #~~~~~~~~~~~~~~~~~~~~~~ "target signal level (0-32768)" int typestr="number" diff --git a/m4/gengetopt/config_file.m4 b/m4/gengetopt/config_file.m4 index 318ba7a6..29f66b44 100644 --- a/m4/gengetopt/config_file.m4 +++ b/m4/gengetopt/config_file.m4 @@ -1,5 +1,5 @@ -option "config_file" c +option "config-file" c #~~~~~~~~~~~~~~~~~~~~~ "(default='DEFAULT_CONFIG_FILE')" string typestr="filename" diff --git a/m4/gengetopt/gui.m4 b/m4/gengetopt/gui.m4 index 1f5cf6e4..5b44efa6 100644 --- a/m4/gengetopt/gui.m4 +++ b/m4/gengetopt/gui.m4 @@ -34,7 +34,7 @@ details = " available themes is printed and the program terminates. " -option "stat_cmd" s +option "stat-cmd" s #~~~~~~~~~~~~~~~~~~ "command to read status items from" string typestr = "command" @@ -56,7 +56,7 @@ details = " section "Mapping keys to commands" #--------------------------------- -option "key_map" k +option "key-map" k #~~~~~~~~~~~~~~~~~ "Map key k to command c using mode m." diff --git a/m4/gengetopt/history_file.m4 b/m4/gengetopt/history_file.m4 index 932d88bf..73e98a78 100644 --- a/m4/gengetopt/history_file.m4 +++ b/m4/gengetopt/history_file.m4 @@ -1,5 +1,5 @@ -option "history_file" - +option "history-file" - #~~~~~~~~~~~~~~~~~~~~~~ "(default='DEFAULT_HISTORY_FILE')" string typestr = "filename" diff --git a/m4/gengetopt/makefile b/m4/gengetopt/makefile index 548a3d5d..035f44a5 100644 --- a/m4/gengetopt/makefile +++ b/m4/gengetopt/makefile @@ -16,37 +16,11 @@ ifeq ($(ggo_descriptions_declared),no) echo 'extern const char *$(*F)_args_info_description;' >> $(cmdline_dir)/$(*F).cmdline.h endif -$(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 \ - $(m4_ggo_dir)/channels.m4 \ - $(m4_ggo_dir)/sample_rate.m4 \ - $(m4_ggo_dir)/sample_format.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)/fade.ggo: $(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/config_file.m4 -$(ggo_dir)/resample_filter.ggo: \ - $(m4_ggo_dir)/channels.m4 \ - $(m4_ggo_dir)/sample_rate.m4 \ - $(m4_ggo_dir)/sample_format.m4 -$(ggo_dir)/play.ggo: $(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/config_file.m4 +$(m4depdir)/%.m4d: $(m4_ggo_dir)/%.m4 | $(m4depdir) + @[ -z "$(Q)" ] || echo 'M4D $<' + $(Q) m4 -I $(m4_ggo_dir) --debug=i $< 3>&1 1>/dev/null 2>&3 \ + | awk '{if ($$0 ~ "^m4debug: input read from ") \ + print "$(ggo_dir)/$(*F).ggo: " $$NF}' > $@ $(ggo_dir)/%.ggo: $(m4_ggo_dir)/%.m4 $(m4_ggo_dir)/header.m4 | $(ggo_dir) @[ -z "$(Q)" ] || echo 'M4 $<' diff --git a/m4/gengetopt/play.m4 b/m4/gengetopt/play.m4 index ea41f562..cb406bec 100644 --- a/m4/gengetopt/play.m4 +++ b/m4/gengetopt/play.m4 @@ -33,7 +33,7 @@ option "randomize" z "randomize playlist at startup." flag off -option "key_map" k +option "key-map" k #~~~~~~~~~~~~~~~~~ "Map key k to a command." diff --git a/m4/gengetopt/server.m4 b/m4/gengetopt/server.m4 index 8707554f..4c52d2c2 100644 --- a/m4/gengetopt/server.m4 +++ b/m4/gengetopt/server.m4 @@ -42,7 +42,7 @@ include(logfile.m4) include(config_file.m4) -option "user_list" - +option "user-list" - #~~~~~~~~~~~~~~~~~~~ "(default='~/.paraslash/server.users')" @@ -60,7 +60,7 @@ option "autoplay" a "start playing on startup" flag off -option "autoplay_delay" - +option "autoplay-delay" - #~~~~~~~~~~~~~~~~~~~~~~~~ "time to wait before streaming" int typestr="ms" @@ -76,7 +76,7 @@ details=" already up when para_server starts to stream. Of course, this option depends on the autoplay option. " -option "announce_time" A +option "announce-time" A #~~~~~~~~~~~~~~~~~~~~~~~ "grace time for clients" @@ -95,7 +95,7 @@ details=" section "audio file selector" ############################# -option "afs_database_dir" D +option "afs-database-dir" D #~~~~~~~~~~~~~~~~~~~~~~~~~~ "location of the database" string typestr="path" @@ -105,7 +105,7 @@ details=" file selector. The default is '~/.paraslash/afs_database-0.4'. " -option "afs_socket" s +option "afs-socket" s #~~~~~~~~~~~~~~~~~~~~ "Command socket for afs" string typestr="path" @@ -117,7 +117,7 @@ details=" audio file selector via a local socket. This option specifies the location of that socket in the file system. " -option "afs_initial_mode" i +option "afs-initial-mode" i #~~~~~~~~~~~~~~~~~~~~~~~~~~ "Mood or playlist to load on startup." @@ -128,7 +128,7 @@ 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 + --afs-initial-mode p/foo loads the playlist named 'foo'. " @@ -137,7 +137,7 @@ section "http sender" ##################### -option "http_port" - +option "http-port" - #~~~~~~~~~~~~~~~~~~~ "tcp port for http streaming" int typestr="portnumber" @@ -149,20 +149,20 @@ details=" http request message such as 'GET / HTTP/'. " -option "http_default_deny" - +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 + 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. + more http-access options. " -option "http_access" - +option "http-access" - #~~~~~~~~~~~~~~~~~~~~~ "add an entry to the http ACL" string typestr="a.b.c.d/n" @@ -170,13 +170,13 @@ optional multiple details=" Add given host/network to access control list (whitelist if - http_default_deny was given, blacklist otherwise) before + 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" - +option "http-no-autostart" - #~~~~~~~~~~~~~~~~~~~~~~~~~~~ "do not open tcp port on startup" flag off @@ -186,7 +186,7 @@ details=" later time by using the sender command. " -option "http_max_clients" - +option "http-max-clients" - #~~~~~~~~~~~~~~~~~~~~~~~~~~ "maximal number of connections" int typestr="number" @@ -204,45 +204,45 @@ section "dccp sender" ##################### -option "dccp_port" - +option "dccp-port" - #~~~~~~~~~~~~~~~~~~~ "port for dccp streaming" int typestr="portnumber" default="8000" optional details=" - See http_port for details. + See http-port for details. " -option "dccp_default_deny" - +option "dccp-default-deny" - #~~~~~~~~~~~~~~~~~~~~~~~~~~~ "make the dccp ACL a whitelist" flag off details=" - See http_default_deny for details. + See http-default-deny for details. " -option "dccp_access" - +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. + See http-access for details. " -option "dccp_max_clients" - +option "dccp-max-clients" - #~~~~~~~~~~~~~~~~~~~~~~~~~~ "maximal number of connections" int typestr="number" default="-1" optional details=" - See http_max_clients for details. + See http-max-clients for details. " -option "dccp_max_slice_size" - +option "dccp-max-slice-size" - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Upper bound for the FEC slice size" int typestr = "size" @@ -261,7 +261,7 @@ details = " the MPS of an incoming connection can not be set. " -option "dccp_data_slices_per_group" - +option "dccp-data-slices-per-group" - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "The number of non-redundant slices per FEC group" int typestr = "num" @@ -270,13 +270,13 @@ 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. + 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. + product dccp-max-slice-size * dccp-data-slices-per-group. " -option "dccp_slices_per_group" - +option "dccp-slices-per-group" - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "The total number of slices per FEC group" int typestr = "num" @@ -284,7 +284,7 @@ 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 + 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. @@ -296,7 +296,7 @@ details = " section "udp sender" #################### -option "udp_target" - +option "udp-target" - #~~~~~~~~~~~~~~~~~~~~ "add udp target with optional port" string typestr="host[:port]" @@ -306,7 +306,7 @@ 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. + 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); @@ -317,7 +317,7 @@ details=" This option can be given multiple times, for multiple targets. " -option "udp_no_autostart" - +option "udp-no-autostart" - #~~~~~~~~~~~~~~~~~~~~~~~~~~ "do not start sending" flag off @@ -326,20 +326,20 @@ details=" a later time by using the sender command. " -option "udp_default_port" - +option "udp-default-port" - #~~~~~~~~~~~~~~~~~~~~~~~~~~ "udp port to send to" int typestr="port" default="8000" optional -option "udp_mcast_iface" - +option "udp-mcast-iface" - #~~~~~~~~~~~~~~~~~~~~~~~~~~ "outgoing udp multicast interface" string optional -option "udp_header_interval" H +option "udp-header-interval" H #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "duration for sending header" int typestr = "ms" @@ -357,7 +357,7 @@ details = " audio formats, including mp3, don't need an audio file header. " -option "udp_ttl" t +option "udp-ttl" t #~~~~~~~~~~~~~~~~~ "set time to live value" int typestr="num" diff --git a/skencil/overview.sk b/skencil/overview.sk deleted file mode 100644 index 5ab648c8..00000000 --- a/skencil/overview.sk +++ /dev/null @@ -1,474 +0,0 @@ -##Sketch 1 2 -document() -layout('A4',0) -layer('Layer 1',1,1,0,0,(0,0,0)) -lw(1) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(184.297,654.341,0) -bs(184.297,732.403,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('open file',(1.19433e-15,1,-1,1.19433e-15,181.259,668.683)) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('mp3 data',(-1.83691e-16,-1,1,-1.83691e-16,193.585,717.172)) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(190.547,726.853,0) -bs(190.547,655.774,0) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(145.824,181.165,0) -bs(228.568,181.165,0) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(228.568,161.165,0) -bs(145.824,161.165,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('connect local socket',(1.19433e-15,1,-1,1.19433e-15,272.988,207.639)) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(307.4,339.815,0) -bs(307.4,200,0) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(280,200,0) -bs(280,339.815,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('server & audiod status',(-1.83691e-16,-1,1,-1.83691e-16,310.438,332.705)) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(99.2303,144.289,0) -bs(99.2303,73.1918,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('s&a status',(-1.83691e-16,-1,1,-1.83691e-16,102.268,137.713)) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(61.1648,150.482,0) -bs(61.1647,71.2323,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('cmd output',(-1.83691e-16,-1,1,-1.83691e-16,64.2028,142.553)) -lw(0.992126) -ld((0.10000000000000001, 1.0)) -b() -bs(24.7094,792.443,0) -bs(310.724,792.443,0) -bs(310.421,640.011,0) -bs(561.98,639.817,0) -bs(561.98,538.528,0) -bs(24.7094,538.528,0) -bs(24.7094,792.443,0) -bC() -fp((0,0,0)) -le() -lw(1) -Fn('Times-Italic') -txt('server host',(252.845,779.314)) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Italic') -txt('client host',(512.93,400.509)) -G() -lw(1) -r(119.09,0,0,-28.2587,39.0214,375.322) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(24) -txt('para_client',(45.2504,355.601)) -G_() -G() -lw(1) -r(143.312,0,0,-28.2587,408.597,189.57) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(24) -txt('sound_device',(414.265,169.849)) -G_() -G() -lw(1) -r(94.8684,0,0,-28.2587,34.9844,58.6731) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(24) -txt('terminal',(42.4226,38.9517)) -G_() -G() -lw(1) -r(131.201,0,0,-28.2587,237.937,189.4) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(24) -txt('para_audioc',(244.894,169.678)) -G_() -G() -lw(1) -r(94.8684,0,0,-28.2587,34.9844,189.4) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(24) -txt('para_gui',(40.4306,169.678)) -G_() -fp((0.9,0.9,0.9)) -lw(1) -r(177.037,0,0,-89.6831,384.699,788.574) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Bold') -Fs(36) -txt('paraslash',(399.201,755.055)) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Bold') -Fs(36) -txt('0.4.0',(437.217,712.433)) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('fork & exec',(153.764,182.009)) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('s&a status',(158.223,162.009)) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('fork & exec',(1.19433e-15,1,-1,1.19433e-15,70.3615,232.519)) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(73.3994,201.263,0) -bs(73.3995,330.639,0) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(103.54,330.639,0) -bs(103.539,201.263,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('cmd output',(-1.83691e-16,-1,1,-1.83691e-16,106.577,297.647)) -lw(0.992126) -ld((0.10000000000000001, 1.0)) -b() -bs(29.1803,415.392,0) -bs(570.132,415.357,0) -bs(570.132,26.3198,0) -bs(27.1619,26.3198,0) -bs(27.1619,413.359,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt(' server cmd',(2.57235e-15,1,-1,2.57235e-15,359.444,441.487)) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('result',(-1.83691e-16,-1,1,-1.83691e-16,380.89,496.536)) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('connect tcp',(1.19433e-15,1,-1,1.19433e-15,420.523,446.644)) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(426.278,433.194,0) -bs(426.278,524.243,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('server status',(-1.83691e-16,-1,1,-1.83691e-16,438.254,513.515)) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(431.433,522.224,0) -bs(431.433,434.203,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('mp3 data ',(-1.83691e-16,-1,1,-1.83691e-16,513.965,505.064)) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(506.551,520.71,0) -bs(506.551,433.193,0) -G() -lw(1) -r(301.847,0,0,-28.2587,220.095,375.322) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(24) -txt('para_audiod',(311.703,355.601)) -G_() -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(144.486,419.683,0) -bs(144.486,431.685,0) -bs(368.033,431.685,0) -bs(368.033,531.257,0) -lw(1) -la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(151.551,419.179,0) -bs(151.551,424.722,0) -bs(374.601,424.722,0) -bs(374.601,529.224,0) -lw(1) -ld((4, 4)) -r(156.432,0,0,-101.428,50.1221,646.762) -G() -lw(1) -r(41.883,0,0,-28.2587,160.634,643.23) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(24) -txt('afh',(166.229,623.509)) -G_() -fp((0,0,0)) -le() -lw(1) -Fn('Times-Italic') -txt('afs process',(106.135,651.24)) -lw(1) -r(0,0,0,-0.504639,125.815,629.1) -lw(1) -ld((5, 5)) -r(272.999,0,0,-67.6189,281.238,614.467) -lw(1) -r(78.2156,0,0,-28.2587,289.816,609.925) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(24) -txt('vss',(313.588,590.204)) -lw(1) -r(73.674,0,0,-59.5452,470.974,609.925) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(24) -txt('sender',(477.579,574.056)) -lw(1) -r(167.533,0,0,-28.2587,289.816,577.629) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(24) -txt('cmd',(0.886791,0,0,1,355.258,557.908)) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Italic') -txt('server process',(286.284,618.44)) -G() -lw(1) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(216.351,599.242,0) -bs(272.871,599.242,0) -lw(1) -la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(216.351,603.697,0) -bs(272.87,603.697,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('open fd',(223.502,588.236)) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('request fd',(217.951,607.917)) -G_() -G() -lw(1) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(216.688,555.341,0) -bs(273.208,555.341,0) -lw(1) -la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(216.688,559.796,0) -bs(273.207,559.796,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('result',(228.885,545.344)) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('afs cmd',(222.83,563.006)) -G_() -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(79.9931,735.431,0) -bs(79.9931,652.573,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('osl result',(-1.83691e-16,-1,1,-1.83691e-16,83.0311,719.475)) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('osl query',(3.06152e-16,1,-1,3.06152e-16,68.1098,669.658)) -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(73.6709,653.078,0) -bs(73.6709,735.936,0) -G() -lw(1) -r(119.595,0,0,-46.425,75.8576,784.523) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -txt('file system',(108.732,771.908)) -G() -G() -lw(1) -r(48.4434,0,0,-21.1941,81.9131,764.929) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -txt('osl table',(85.9688,750.758)) -G_() -G() -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -txt('mp3 file',(143.495,750.295)) -lw(1) -r(48.4434,0,0,-21.1941,139.44,764.929) -G_() -G_() -G_() -lw(1) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(379.134,590.245,0) -bs(461.495,590.245,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -txt('mp3 data',(397.646,596.3)) -G() -lw(1) -r(120.099,0,0,-53.4896,68.2886,608.411) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(24) -txt('afs',(0.886791,0,0,1,115.93,576.074)) -G_() -G() -lw(1) -r(75.1101,0,0,-28.2587,56.6797,643.23) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(24) -txt('libosl',(67.5587,620.179)) -G_() -G() -lw(0.992126) -la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) -b() -bs(466.036,335.949,0) -bs(466.036,203.05,0) -fp((0,0,0)) -le() -lw(1) -Fn('Times-Roman') -Fs(14) -txt('pcm data',(-1.83691e-16,-1,1,-1.83691e-16,476.076,294.966)) -G_() -guidelayer('Guide Lines',1,0,0,1,(0,0,1)) -guide(-307.905,0) -grid((0,0,20,20),0,(0,0,1),'Grid') diff --git a/t/t0004-server.sh b/t/t0004-server.sh index 3c878eb7..04d6cd60 100755 --- a/t/t0004-server.sh +++ b/t/t0004-server.sh @@ -74,15 +74,15 @@ EOF $PARA_SERVER \ --logfile "$serverlog" \ - --config_file /dev/null \ + --config-file /dev/null \ --daemon \ --loglevel $loglevel \ --port $port \ - --afs_database_dir "$db" \ - --afs_socket "$sock" \ - --user_list "$user_list" \ - --http_port "$stream_port" \ - --dccp_port "$stream_port" + --afs-database-dir "$db" \ + --afs-socket "$sock" \ + --user-list "$user_list" \ + --http-port "$stream_port" \ + --dccp-port "$stream_port" fi for ((i=0; i < ${#commands[@]}; i++)); do @@ -114,9 +114,9 @@ for ((i=0; i < ${#commands[@]}; i++)); do test_expect_success "$command" " $PARA_CLIENT \ --loglevel $loglevel \ - --server_port $port \ - --key_file $privkey \ - --config_file /dev/null \ + --server-port $port \ + --key-file $privkey \ + --config-file /dev/null \ -- \ ${cmdline[$i]} > $command.out && { [[ -z \"${good[$i]}\" ]] || grep \"${good[$i]}\"; } < $command.out && diff --git a/web/dia/overview.dia b/web/dia/overview.dia new file mode 100644 index 00000000..f9e01586 --- /dev/null +++ b/web/dia/overview.dia @@ -0,0 +1,3817 @@ + + + + + + + + + + + + + #A4# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #Overview# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #para_server# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #Incoming connections arrive via TCP at the dispatcher which creates a +command handler process for each connection. + +After the connecting client has been authenticated, the command +handler propagates the incoming request either to the audio file +selector (afs) or to the virtual streaming system (vss). Results are sent +back to the client. + +afs maintans the audio file database and is responsible for selecting +and loading audio files while vss controls the paraslash senders. When +vss needs to stream an audio file it requests an open file descriptor from +afs and feeds small chunks of data (e.g. mp3 frames) to the senders +which send the chunks to all connected clients.# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #dispatcher# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #senders# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #vss# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #command +handler# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #afs# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #para_server# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #para_audiod# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #para_audioc# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #para_gui# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #para_client# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #The two main applications of the paraslash suite (shaded green) are +para_server and para_audiod. Both run in the background usually. +para_server maintains the audio file database and acts as the streaming +source, while para_audiod is the streaming client. + +The two client programs, para_client and para_audioc communicate +with para_server and para_audiod, respectively. + +para_gui controls para_server/audiod by executing paraslash commands. +Command output is shown in a curses window. para_gui automatically +executes para_audioc to obtain the state of para_audiod and para_server +and the metadata of the current audio file. + +Network connections are shaded grey, local connections black.# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #para_audiod# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #The purpose of para_audiod is to download, decode and play an audio +stream received from para_server. It fetches the para_server status and +starts a suitable buffer tree (shaded blue) if an audio stream is available. + +The buffer tree usually consists of a receiver, any number of filters and +a writer. The receiver downloads the audio stream from para_server and +the filters decode or modify the received data. The writer plays the +decoded stream. + +The dispatcher acts on (local) requests from para_audioc, for example to +dump information about the current audio file.# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #The audio file selector (afs) accepts two different kinds of incoming +connections: A bidirectional pipe shared with para_server is used for +passing the file descriptor of the current audio file to the server +process. The local socket is used by command handlers which query +or update the database. + +To add a new file to the database, afs opens the file and locates an +audio format handler (afh) that recognizes the file. A new database +entry with metadata obtained from the afh is then added to the +database.# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #The audio file selector# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #audio files# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #para_server# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #afh# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #osl db# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #command handler# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #afs# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #The OSL database# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #Metadata about all known audio files is stored in serveral tables of a +database which is driven by libosl, the object storage layer library. + +The "audio files" table is the main table of the database. It contains +path, hash and metadata of each known file. + +The "attributes" table maps each of the 64 possible attributes to a +string. The attribute value of the file's metadata is translated through +this table. + +The tables shown shaded are blob tables which support add, rm, mv, +cat, ls commands. All of these are optional. + +The "score" table describes the subset of admissible files for the +current playlist or mood. This table is created on demand, resides +only in memory and is discarded on exit. + +When the next audio file is to be streamed, the audio file selector gets +the entry with the highest score from the "score" table, obtains path, +hash, and metadata for this entry from the "audio files" table, opens +the path and verifies the hash.# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #audio files# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #playlists# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #images# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #attributes# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #lyrics# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #moods# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #score# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #dispatcher# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #status fetcher# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #para_server# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #receiver# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #filter1# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #filter 2# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #writer# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #para_audioc# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/images/paraslash.ico b/web/images/paraslash.ico index 860c5abd..fd17a649 100644 Binary files a/web/images/paraslash.ico and b/web/images/paraslash.ico differ diff --git a/web/images/paraslash.png b/web/images/paraslash.png index d4a1bd9a..a06d6a1a 100644 Binary files a/web/images/paraslash.png and b/web/images/paraslash.png differ diff --git a/web/manual.m4 b/web/manual.m4 index 3f5f148f..55bb49a6 100644 --- a/web/manual.m4 +++ b/web/manual.m4 @@ -406,7 +406,7 @@ the directory /var/paraslash that has been created during installation: sudo chown $LOGNAME /var/paraslash -Alternatively, use the --afs_socket Option to specify a different +Alternatively, use the --afs-socket Option to specify a different location for the AFS command socket. For this first try, we'll use the info loglevel to make the output @@ -592,7 +592,7 @@ The user_list file At startup para_server reads the user list file which contains one line per user. The default location of the user list file may be -changed with the --user_list option. +changed with the --user-list option. There should be at least one user in this file. Each user must have an RSA key pair. The public part of the key is needed by para_server @@ -639,7 +639,7 @@ restricted on platforms that support UNIX socket credentials which allow para_audiod to obtain the Unix credentials of the connecting process. -Use para_audiod's --user_allow option to allow connections only for +Use para_audiod's --user-allow option to allow connections only for a limited set of users. ----------------------- @@ -1770,7 +1770,7 @@ a curses window. By default the command para_audioc -- stat -p -is executed, but this can be customized via the --stat_cmd option. In +is executed, but this can be customized via the --stat-cmd option. In particular it possible to use para_client -- stat -p