| Commit message (Collapse) | Author | Age |
| |
|
|
|
| |
It's a hassle to maintain, the link is dead since the server moved from
gitweb to cgit, and nobody except the bots care anyway.
|
| |
|
|
|
| |
Activating audiod if it happens to run in standby mode is easy to do and
obviously correct.
|
| |
|
|
| |
Running autom4te with the cache enabled makes it twice as fast.
|
| |
|
|
| |
Fixes: f57809b6f950380ceaee9bb2b47915441dd9c7b0
|
| |
|
|
|
|
| |
Only one reference: client_open() errors out if the argument vector does
not include any subcommand. The plain EINVAL seems to be a better fit for
this particular case, so..
|
| |
|
|
|
| |
This is shorter and conveys enough information. Rename the static para_exec()
as well.
|
| |
|
|
|
| |
obj.data is a void * pointer, so no cast is needed. Also, the name pointer
can never be NULL here, so assert this.
|
| |
|
|
|
|
| |
The latter calls the former, both check for zero length but return different
error codes in this case. Avoid the redundant check, return consistent error
codes, and fix the type of the map pointer argument.
|
| |
|
|
|
|
|
|
|
| |
This modifies version-gen.sh to append the output of
git describe --all --contains HEAD
to the version string we had before. This results in version strings like
"0.8.3-2-master" or "0.8.3-2-g239d-t/misc~1".
|
| |
|
|
| |
lopsub has been removed from Debian.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In para_exec(), the parent does not detect errors that occur in the child
after the call to fork() succeeded. This includes the common error case
where the child's call to execvp() fails due to a path lookup error.
It is not difficult to implement error detection by introducing an additional
"control" pipe whose file descriptors are opened with O_CLOEXEC. If the
child's call to execvp() succeeds, the OS closes the descriptor and the
function does not return, Otherwise the descriptor remains open and execvp()
returns with errno set to indicate the error. In this case the child writes a
four byte representation of errno to the control pipe and exits. The parent
reads from the other end of the pipe. If the read returns zero, execvp()
succeeded. Otherwise, the parent has an error code to work with.
|
| |
|
|
|
|
|
|
| |
The result pointer can never be NULL here as all callers pass the reference
of a variable. "Assert" this by dereferencing the pointer at the start of the
function, because (a) this makes future users which pass NULL fail early,
and (b) it's best practice to initialize the result even if the function
returns negative to indicate failure.
|
| | |
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Built-in audioc support and a new theme for para_gui
----------------------------------------------------
This series contains two significant improvements for para_gui: (a) The built-in
audioc support and (b) the new figlet theme. The patch that implements (a)
splits audioc.c so that code that can be shared with para_gui goes to the
new audioc_common.c. The next few preparatory patches on top of that rig
up struct gui_theme to give each theme full control over the top window,
paving the way for (b).
* t/gui:
web: Add/replace gui screenshots.
gui: Remove the "version" command.
gui: Rename curses windows.
gui: New theme: figlet.
gui: Remove two confusing local variables of init_wins().
gui: Introduce ->print_status_items() of struct gui_theme.
gui: Require ncurses.
gui: Inline clear_all_items().
gui: Avoid the para_audioc process.
gui/audiod: Replace for_each_stat_item() by parse_status_items().
gui: Don't request a minimal delay when an external command is running.
|
| | |
| |
| |
| |
| |
| | |
The screenshot that shows the colorful blackness theme of para_gui was
last updated 13 years ago. Replace it with a recent screenshot that has the
progress bar and add a second screenshot that shows para_gui's new figlet theme.
|
| | |
| |
| |
| |
| | |
The version string is shown in the version bar, so this internal command is
kind of moot.
|
| | |
| |
| |
| |
| | |
Rename in to sbar and sb to vbar, as this is still short but conveys the
meaning of both one-line windows better.
|
| | |
| |
| |
| |
| | |
This adds another theme for para_gui which displays the artist and title of the
current file using large ascii art characters produced by the figlet(1) utility.
|
| | |
| |
| |
| |
| |
| | |
The variables sep_y and sep_lines should have been renamed to pbar_y and
pbar_lines when the progress bar was implemented, but we may as well simply
remove them because sep_y always equals top_lines, and sep_lines is always one.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This replaces the array of struct stat_item_data by a function pointer. The
array approach is still used by the colorful blackness theme, which now
defines its own array in gui_theme.c. This allows the definition of struct
stat_item_data to be private to gui_theme.c.
The "simple" theme now tries to display a suitable string to describe the
current audio file rather than always showing the basename. Drop the server
and audiod status items it used to show. It's called "simple", after all.
Both themes need to align the strings they print, so align_str() has
to become public.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The FreeBSD and NetBSD installations on which this software is tested both
provide the ncurses headers and libraries these days. This is enough reason to
justify the change because the non-ncurses build no longer gets any testing
and may well be broken already.
This change allows us to make use of extensions that are not part of the
standard. For starters, drop an ncurses specific #define, and prefer getmaxy()
over the silly get_num_lines() dance we do right now.
|
| | |
| |
| |
| | |
Only one caller.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changes gui.c to no longer spawn a para_audioc process to get the status
items from para_audiod. Instead, the para_gui process connects directly to
audiod using the same mechanism as para_audioc. Besides being more efficient,
this approach has the advantage that status item updates are now atomic in
the sense that complete sideband packages (containing any number of status
items) are received, so torn status items can no longer occur.
To implement this, move the code that can be shared between gui and audioc
to a separate file, audioc_common.c. This file contains only one public
function: connect_audiod(). Since this function uses unix socket magic and
employs the sideband API, para_gui needs to link in net.o and sideband.o,
in addition to the new audioc_common.o.
With these changes in place, para_gui's --stat-command option becomes
unused. Drop it, as it's not worth the pain to introduce a depreciation
period. On the other hand, para_gui now needs an option to specify the path
to the socket on which para_audiod is expected to listen, so move the lopsub
stanza of para_audioc's --socket option to the new socket.m4 file and include
it from both the audioc and the gui lopsub suites.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The old function received a callback, and called it once per item received.
This inevitably leads to situations where one status item is already uptodate
but others are not.
The replacement function no longer takes a callback pointer but a pointer
to the array of status items to update, and returns the mask of items that
have changed. Parse errors are now regarded as implementation bugs. We
still detect them and log an error, but the function can no longer fail.
Remove print_all_items() from gui.c since this can now be done in one line
by passing ~0 to print_stat_items().
|
| | |
| |
| |
| |
| | |
This may lead to a busy loop when the external command is started at an
unfortunate moment.
|
| | |
| |
| |
| |
| |
| |
| | |
Remove the cargo cult code that was taken many moons ago from APUE. The
SIGALRM bit is safe because no paraslash executable catches SIGALARM anyway,
and SA_RESTART is defined on Linux and {Free,Net}BSD, so sa_flags gets set
on all supported systems.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Depreciation of the file writer
-------------------------------
This deprecates an ancient feature which was never really useful.
* t/depr-file_writer:
Deprecate the file writer.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
The file writer was an early experiment, introduced in 2006 mainly as as POC,
and to have at least two writers. It was never really useful for anything,
so schedule its removal to some point after 0.9.0.
|
| | | |
| | |
| | |
| | |
| | | |
Drop some implementation details and describe the semantics of the pid
pointer in the error case.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Improved test suite
-------------------
The test suite has become a little dusty, so here are a few cleanups, one
of which re-enables unrestricted parallel builds.
* t/test-lib:
test: Change suffix of test scripts to .bash.
test: Rename makefile.test.
test: Use bash case modification.
test: Simplify color output.
test: Replace echo by printf.
test: Remove unused --immediate and --long.
test: Trivial coding style cleanups.
|
| | | | |
| | | |
| | | |
| | | | |
All of these are bash scripts, after all.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
The lopsub and the bison makefiles which are included from Makefile.real
are simply called "makefile", so let's be consistent.
|
| | | | |
| | | |
| | | |
| | | | |
This saves a tr(1) invocation per executable.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use ANSI escape sequences instead of running tput(1) many times. We now
set and reset the color in one step, so colors are no longer messed up when
running tests in parallel. This allows us to remove the .NOTPARALLEL: target
in makefile.test.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
In view of the "irreconcilable differences in the various versions of echo"
(see the POSIX(1) man page of printf), printf should be preferred over echo.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Remove superfluous quotes, replace double quotes by single quotes where
possible, and prevent double expansion in arithmetic evaluation.
|
| | |_|/
|/| |
| | |
| | |
| | | |
Currently para_exec() ignores all errors from dup2(). Introduce xdup2()
to teach para_exec() to abort on fatal errors and to retry on EINTR.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
If para_exec() fails, it may return with or without writing through the pid
pointer. It's safer to initialize the pid at the beginning of the function
so that pid == 0 iff no process was created.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Minor audiod cleanups
---------------------
A bunch of smallish cleanups and two user-visible improvements.
* t/audiod:
audiod: Dedoxify audiod_command.c.
audiod: Write help error message to error sideband.
audiod: Simplify get_time_string().
audiod: Remove stale comment of audiod_cleanup().
audiod: Update time string when jumping while paused.
audiod: Simplify command_post_monitor().
audiod: Combine definition and instantiation of struct status_task.
audiod: Drop some useless comments.
audiod: Remove pointless zeroing.
audiod: Drop ->current_audio_format_num of struct status_task.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The documentation included too much detail, which is not helpful for the
doxygen web page because it only hides the interesting part of the file
(the five public functions).
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Without this, the error message returned by lsu_com_help() is written to
the SBD_OUTPUT band. As a result,
para_audioc help does_not_exist 2>/dev/null
prints the message to stdout.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If para_audiod was started in the middle of the stream, we used to first
compute the writer uptime wtime from the writer start time wstime
wtime := now - wstime,
then adjust wtime as follows:
delay := wstime - server_stream_start
wtime += delay.
It's simpler to do
wtime := now - server_stream_start
as this is less confusing and saves an operation. Kill the pointless msg
char pointer while at it.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This function does not remove the audiod socket. It is static, short and
simple, so it does not need to be documented at all.
|
| | | | |
| | | |
| | | |
| | | | |
Without this, the stream position is only updated when the stream is resumed.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Remove the forced dumps. New clients get a full dump anyway, so this code
is not necessary.
|
| | | | |
| | | |
| | | |
| | | | |
This saves a few lines and makes the code more readable.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
The stat_task pointer points to global static memory, which is guaranteed
to contain only zeroes at startup.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Caching this value creates more problems than it solves, and it results in
quite some complexity regarding the invalidation of the cached number. Just
compute the audio format number where it is needed and be done with it.
|