Andre [Thu, 15 Jun 2006 13:08:40 +0000 (15:08 +0200)]
client_common.c: clean up log messages
Andre [Thu, 15 Jun 2006 12:21:02 +0000 (14:21 +0200)]
update to libortp-0.10.0
Actually, this version of libortp seems to have a bug which causes
the ortp receiver to segfault. Fix seems to be simple and is already
sent out to the linphone mailing list.
Moreover, Simon made msg_to_buf() static ;(
An easy solution to this problem is to provide an own version in
ortp_recv.c.
Andre [Thu, 15 Jun 2006 11:25:37 +0000 (13:25 +0200)]
gui: mark all fds used for select() as non-blocking.
Andre [Thu, 15 Jun 2006 10:43:27 +0000 (12:43 +0200)]
integrate para_client into para_audiod
This allows major simplifications:
- get rid of exec.o: para_audiod no longer executes any external
programs
- get rid of close_on_fork.o
- get rid of the sigchld handler.
Andre [Thu, 15 Jun 2006 08:50:38 +0000 (10:50 +0200)]
fix thinko in para_client's para_log()
Andre [Thu, 15 Jun 2006 08:23:20 +0000 (10:23 +0200)]
Fix some format string warnings on Max OS
Trivial %d -> %zd conversions.
Andre [Thu, 15 Jun 2006 08:07:53 +0000 (10:07 +0200)]
split client.c
new file: client.h
new file: client_common.c
This completes the preparations for including para_client into para_audiod.
client_common.c contains all functions that are also useful for para_audiod.
Andre [Thu, 15 Jun 2006 06:08:38 +0000 (08:08 +0200)]
audiod clean_exit(): Only check status fd once
The close_stat_pipe() already does this check.
Andre [Thu, 15 Jun 2006 06:06:44 +0000 (08:06 +0200)]
init_tcp_socket: close socket fd on errors
The current code may leak the fd if bind fails, for example. This is
a benign bug however, since all paraslash applications that call
init_tcp_socket() terminate on errors anyway.
But it is no good idea to rely on this, so close the fd on errors.
This patch also gets rid of the do_bind() one-liner which was only
called from init_tcp_socket().
Andre [Wed, 14 Jun 2006 14:34:50 +0000 (16:34 +0200)]
overview.sk: update to 0.2.13
Andre [Tue, 13 Jun 2006 11:45:30 +0000 (13:45 +0200)]
reformat audioc.ggo
for better readability.
Andre [Tue, 13 Jun 2006 11:41:20 +0000 (13:41 +0200)]
audioc: kill unused --timeout option
Andre [Tue, 13 Jun 2006 11:39:23 +0000 (13:39 +0200)]
audioc: Kill debugging output
Andre [Tue, 13 Jun 2006 11:34:38 +0000 (13:34 +0200)]
Make INSTALL, README and README.mysql grutatext-friendly
Andre [Tue, 13 Jun 2006 09:41:28 +0000 (11:41 +0200)]
mark all fds used for select() as non-blocking
This shouldn't matter much, but there _are_ (rare) situations where
an fd is marked ready for reading, but a subsequent read will block
nevertheless. It's never wrong to use non-blocking fds, so just do it.
This patch also includes a check in para_fd_set() which spots blocking
fds as they are added to the fd sets. This check is commented out
for performance reasons but can easily be activated.
Andre [Tue, 13 Jun 2006 04:26:45 +0000 (06:26 +0200)]
get rid of init_shed()
Instead, the first call to register_task initializes the scheduler.
User-friendly. Also, make pre_select_list and post_select_list static.
Andre [Tue, 13 Jun 2006 03:15:52 +0000 (05:15 +0200)]
doxify missing bits
This makes the documentation complete again.
Andre [Tue, 13 Jun 2006 01:53:48 +0000 (03:53 +0200)]
complete documentation of stdin.* and stdout.*
Andre [Tue, 13 Jun 2006 01:30:48 +0000 (03:30 +0200)]
doxify stdout.c
Andre [Tue, 13 Jun 2006 01:14:33 +0000 (03:14 +0200)]
fix documentation of get_host_info()
Andre [Tue, 13 Jun 2006 01:11:14 +0000 (03:11 +0200)]
doxify stdin.h
Andre [Mon, 12 Jun 2006 13:17:06 +0000 (15:17 +0200)]
Add scheduler documentation
and a GPL header
Andre [Mon, 12 Jun 2006 13:16:01 +0000 (15:16 +0200)]
fix cut-and paste typo.
Andre [Mon, 12 Jun 2006 08:44:54 +0000 (10:44 +0200)]
make para_client use the scheduler.
Andre [Mon, 12 Jun 2006 07:36:59 +0000 (09:36 +0200)]
stdout pre_select(): use a minimal delay on input eof
Andre [Mon, 12 Jun 2006 07:34:08 +0000 (09:34 +0200)]
string.c: fix split_args()
If the submitted command started with a newline, the number of
arguments was calculated as zero.
Andre [Mon, 12 Jun 2006 04:01:55 +0000 (06:01 +0200)]
client: introduce client_open()
and reorder some functions.
Andre [Mon, 12 Jun 2006 03:51:41 +0000 (05:51 +0200)]
Make crypo a per fd feature
The current code checked if the global pointers crypt_function_recv and
crypt_function_send are non-NULL. In this case it used the given crypt
functions unconditionally for each fd. This makes it messy to enable
crypto only for some fds.
This patch removes these global pointers in favour of an array of
crypt function pointers. Users may use this function to activate
crypto for each fd separately.
Andre [Mon, 12 Jun 2006 01:26:08 +0000 (03:26 +0200)]
move rc4_send_key and rc4_recv_key to struct private_client_data
Andre [Mon, 12 Jun 2006 01:18:16 +0000 (03:18 +0200)]
client: preparations for sched conversion
This introduces struct private_client_data and replaces para_client's
get_options() by client_parse_config().
Andre [Sun, 11 Jun 2006 23:17:56 +0000 (01:17 +0200)]
client: rename "args_info" to "conf"
just to be consistent.
Andre [Sun, 11 Jun 2006 08:17:48 +0000 (10:17 +0200)]
audioc: do not duplicate E_CREDENTIALS
Andre [Sun, 11 Jun 2006 08:03:30 +0000 (10:03 +0200)]
audioc: use the error subsystem
and provide a non-empty log-function.
Andre [Sun, 11 Jun 2006 01:40:56 +0000 (03:40 +0200)]
unify web pages
reformat the text files to make them more friendly to grutatext
and make the headlines of the static pages look the same. Also, remove
the diffstats from NEWS.
Good enough for now.
Andre [Sun, 11 Jun 2006 00:26:02 +0000 (02:26 +0200)]
FEATURES: reformat to grutatext-friendly style
Andre [Sat, 10 Jun 2006 21:36:32 +0000 (23:36 +0200)]
revert recent css changes
Andre [Sat, 10 Jun 2006 21:34:25 +0000 (23:34 +0200)]
audiod_command.c: fix doxygen file documentation
Andre [Sat, 10 Jun 2006 21:26:33 +0000 (23:26 +0200)]
delete level3 in grutatext output
Andre [Sat, 10 Jun 2006 21:17:19 +0000 (23:17 +0200)]
css test
Andre [Sat, 10 Jun 2006 21:02:23 +0000 (23:02 +0200)]
web: replace <pre> by <p>
Andre [Sat, 10 Jun 2006 01:29:27 +0000 (03:29 +0200)]
aacdec: Introduce error_count
and abort after 20 consecutive errors.
Andre [Thu, 8 Jun 2006 03:01:05 +0000 (05:01 +0200)]
audiod: move af_status to struct status_task.
Also add some documentation of struct status_task.
Andre [Wed, 7 Jun 2006 18:17:11 +0000 (20:17 +0200)]
split audiod
move everything that is related to audio commands to the new file
audiod_command.c. Also, simplify the handling of the current time:
The "now" pointer is no longer a field of the sched struct but is
globally visable for read-only access.
Andre [Tue, 6 Jun 2006 08:33:17 +0000 (10:33 +0200)]
para_client: use the error subsystem
Andre [Tue, 6 Jun 2006 06:10:16 +0000 (08:10 +0200)]
client: always log to stderr
Andre [Tue, 6 Jun 2006 01:01:59 +0000 (03:01 +0200)]
dccp_send/http_send: add all fds to close_on_fork_list
This caused para_audiod not to recognize the receiver eof because a
child of the server still had the peer fd open. Nasty.
Andre [Tue, 6 Jun 2006 00:23:10 +0000 (02:23 +0200)]
struct writer: kill unused write_pointer and update documentation
The file writer even had an implementation of the unused write function.
Andre [Tue, 6 Jun 2006 00:05:32 +0000 (02:05 +0200)]
audiod: kill is_frozen() test
Just compute the time difference in open_current_receiver()
and set the scheduler timeout accordingly if neccessary.
Andre [Mon, 5 Jun 2006 23:13:11 +0000 (01:13 +0200)]
fix multiple simultaneous writers
This broke during the integration of the writers into para_audiod
was was noticed only recently.
Andre [Mon, 5 Jun 2006 20:51:43 +0000 (22:51 +0200)]
simplify writer node group
It's not neccessary to register a task for each writer in the wng.
So use only one task for the wng that calls the writer's pre_select()
and post_select().
Andre [Mon, 5 Jun 2006 19:46:17 +0000 (21:46 +0200)]
sched: nuke "flag" field of struct task
It is unused. Kill PRE_ADD_TAIL and POST_ADD_TAIL too.
Andre [Mon, 5 Jun 2006 19:41:15 +0000 (21:41 +0200)]
get_task_list(): construct a more detailed list
Andre [Mon, 5 Jun 2006 19:40:10 +0000 (21:40 +0200)]
do not ignore SIGPIPE
this _might_ solve problems with hanging audiod process. Also, mention the
name of the receiver in the task status.
Andre [Mon, 5 Jun 2006 19:38:17 +0000 (21:38 +0200)]
alsa_writer pre_select: Only set a small timeout if really neccessary.
Andre [Mon, 5 Jun 2006 19:18:16 +0000 (21:18 +0200)]
gttp_send: kill http_shutdown_clients_real()
as it is identical to http_shutdown_clients().
Andre [Sun, 4 Jun 2006 23:36:58 +0000 (01:36 +0200)]
http_send: shutdown clients even if status is not yet HTTP_STREAMING
It's better to let the client reconnect than to send a stream it did not
expect. Clean up a superfluous return statement.
Andre [Sun, 4 Jun 2006 23:32:34 +0000 (01:32 +0200)]
write_common: get rid of POST_ADD_TAIL
just register the tasks the other way round.
Andre [Sun, 4 Jun 2006 20:59:38 +0000 (22:59 +0200)]
More audiod fixes
The bug-quality rises. This patch fixes
the select timeout after receiver open. As the pre_select
function of the receiver just opened will be called _after_
the upcoming select call, we might block for the time of that
call. Only afterwards, the receiver can change the timeout. Fix
this problem by changing the timeout to a minimum from within
start_receiver() (which gets called by audiod_pre_select()).
Resume on server restart. This was broken by design as it
used sleep() and also caused problems with the alsa writer
being restarted too early. We can do much better with the
new scheduler, so introduce a new field "restart_barrier" in
struct status_task and restart para_client and the receivers
not before this time.
Also, set the default timeout to a ridiculous value to detect further
timeout problems and do not kill the decoders even if the status pipe
went south.
Andre [Sun, 4 Jun 2006 19:52:00 +0000 (21:52 +0200)]
filter_chain: Don't return eof too early
The current code may miss to transform the remaining buffer if the
receiver has already deactivated its task. Check for the number of
loaded bytes in the input buffer of the filter chain and return eof
only if nothing is loaded.
Andre [Sun, 4 Jun 2006 19:48:34 +0000 (21:48 +0200)]
add some debugging to fd.c
Detect an invalid fd if passed to para_fd_set and abort in this case.
A typical "values of beta will cause dom!" candidate.
Andre [Sun, 4 Jun 2006 19:45:21 +0000 (21:45 +0200)]
kill some dead code
if pdd is NULL, we have more serious problems, so kill the check.
Andre [Sun, 4 Jun 2006 19:44:17 +0000 (21:44 +0200)]
some audiod fixes
comment out code for unregistering the receiver node from close_receiver.
kill all decoders if !playing
try to close slots in audiod_post_select() rather than in pre_select().
This should fix BADFD error from select().
Andre [Thu, 1 Jun 2006 20:12:47 +0000 (22:12 +0200)]
http_recv/dccp_recv: simplify post_select()
Andre [Thu, 1 Jun 2006 17:54:45 +0000 (19:54 +0200)]
sched/audiod feature: task list and kill
This allows to control the internal state of the scheduler.
Andre [Thu, 1 Jun 2006 03:18:31 +0000 (05:18 +0200)]
trivial loglevel adjustements
Andre [Wed, 31 May 2006 21:04:14 +0000 (23:04 +0200)]
http_recv: set the eof flag on buffer overruns.
Andre [Wed, 31 May 2006 21:03:19 +0000 (23:03 +0200)]
Fix wng_open error handling.
if wn->open() failed, undo all work and set the eof flag in the wng.
Andre [Wed, 31 May 2006 21:01:08 +0000 (23:01 +0200)]
alsa_writer: use non-blocking open mode.
fixes hangs in para_audiod.
Andre [Wed, 31 May 2006 02:38:56 +0000 (04:38 +0200)]
fix dccp sender/receiver
the server side broke during the afs header cleanup, the client side
had a fatal pointer bug and missed to set the return value in its
pre_select function.
Andre [Tue, 30 May 2006 01:23:11 +0000 (03:23 +0200)]
fix audiod on/off/sb commands
Unregister all running tasks in all running slots. That's much
cleaner than using the dirty hack with rn->eof we had before.
Andre [Tue, 30 May 2006 00:49:10 +0000 (02:49 +0200)]
more audiod fixes
introduce output_eof in struct receiver_node to give the receivers
a chance to see if the connected consumer of the receiver data
died in case of an error.
Some eof fixes and cleanups also on the writer side.
We're coming closer.
Andre [Tue, 30 May 2006 00:40:04 +0000 (02:40 +0200)]
alsa_writer: switch back to buffer_time-based timeout calculation
Fixes alsa software mixing
Andre [Mon, 29 May 2006 23:05:54 +0000 (01:05 +0200)]
audio: fix handling of sample_rate and channels count.
This was utterly broken for both para_write and para_audiod as
the writer didn't have a chance to see the computed value from
the filter/wav header.
Fix it by introducing two new pointers in struct writer_node_group
which point to the corresponding variables in struct
filter/check_wav_task.
Tested with 22KHz mono files.
Andre [Mon, 29 May 2006 22:56:35 +0000 (00:56 +0200)]
wng: fix two critical bugs
the open functions of the writers in a writer node group
might be interested to know which group they belong to.
Unfortunately, the old code called open before initializing
the "wng" pointer of the writer node.
The second bug triggers for example if invalid receiver options are
given. In this case wng_close() is called with a NULL-argument as
the wng has not been opened yet. The solution is to check for NULL
pointers and return immediately in this case.
Andre [Mon, 29 May 2006 22:51:32 +0000 (00:51 +0200)]
aacdec: detect buffer overrun and return an errror.
Also, increase the output buffer size and don't try to decode
if the output buffer is already filled at least 60%.
Andre [Mon, 29 May 2006 02:18:16 +0000 (04:18 +0200)]
Merge branch 'sched'
Andre [Mon, 29 May 2006 02:13:34 +0000 (04:13 +0200)]
cosmetics
Andre [Mon, 29 May 2006 02:05:10 +0000 (04:05 +0200)]
more audiod improvements
Make cmd_task and audiod_task local, add more documentation and fix the
eof handling of the ortp receiver.
Andre [Mon, 29 May 2006 01:04:53 +0000 (03:04 +0200)]
audiod: remove bogus check_timeouts()
With the new scheduler, audiod doesn't really know any more,
the number of transfered bytes. So kill that code for now.
Andre [Mon, 29 May 2006 00:52:22 +0000 (02:52 +0200)]
audiod: clean up wng_event_handler()
It should only unregister the wng task. closing is done from
close_decoder_if_idle(), an ugly name. Rename this function to
try_to_close_slot().
Andre [Mon, 29 May 2006 00:27:08 +0000 (02:27 +0200)]
fix writer node group eof
The old code did not set the eof flag at all. This patch fixes the problem
and contains also some loglevel and log message text improvements.
Andre [Sun, 28 May 2006 23:19:20 +0000 (01:19 +0200)]
audiod: fix nasty thinko
"ret" was used where "writer_num" is correct. This makes the "-w" option
of para_audiod work again. Fix another typo too.
Andre [Sun, 28 May 2006 22:05:16 +0000 (00:05 +0200)]
Minor random fixes.
gcc is happy now.
Andre [Sun, 28 May 2006 21:30:51 +0000 (23:30 +0200)]
typo
Andre [Sun, 28 May 2006 21:13:47 +0000 (23:13 +0200)]
audiod help update.
Andre [Sun, 28 May 2006 21:07:12 +0000 (23:07 +0200)]
alsa_writer: use alsa's buffer time
to compute the time of the next chunk. Also, activate non-blocking mode.
Andre [Sun, 28 May 2006 20:51:16 +0000 (22:51 +0200)]
Fix default filter setup
The previous patch broke it.
Andre [Sun, 28 May 2006 20:03:38 +0000 (22:03 +0200)]
more small audiod cleanups.
nothing exciting here.
Andre [Sun, 28 May 2006 19:53:57 +0000 (21:53 +0200)]
audiod: get rid of all calls to gettimeofday().
Use a global variable instead that gets updated from within
audio_pre_select() and audiod_post_select().
Andre [Sun, 28 May 2006 19:35:51 +0000 (21:35 +0200)]
audiod: split init_stream_io()
It consists of three independent parts.
Andre [Sun, 28 May 2006 19:12:35 +0000 (21:12 +0200)]
Open the filters from within audiod_pre_select()
Andre [Sun, 28 May 2006 19:05:49 +0000 (21:05 +0200)]
audiod: avoid another gettimeofday() call
The sched struct already contains the current time.
Andre [Sun, 28 May 2006 18:59:39 +0000 (20:59 +0200)]
audiod: kill close_writer()
This is better handled by the wng event handler.
Andre [Sun, 28 May 2006 18:51:01 +0000 (20:51 +0200)]
audiod: kill some dead code
Andre [Sun, 28 May 2006 18:49:05 +0000 (20:49 +0200)]
integrate writers into para_audiod
Seems to work, but might still be full of bugs.
Andre [Sun, 28 May 2006 15:42:27 +0000 (17:42 +0200)]
announce upcoming features
Andre [Sun, 28 May 2006 05:35:13 +0000 (07:35 +0200)]
configure.ac: add writer objects to para_audiod.
Andre [Fri, 26 May 2006 14:48:15 +0000 (16:48 +0200)]
para_write: Own commandline parsers for each writer
Andre [Thu, 25 May 2006 21:57:48 +0000 (23:57 +0200)]
convert para_audiod to the new scheduler.
As expected, this was a bit harder. It works, but I'm sure there are
plenty of bugs left. Fortnunately, this doesn't matter much right now,
because the next step will be the integration of the writers into the
para_audiod executable. This will lead to major code simplifications,
so let's defer the bug-hunting until this integration is complete.
Andre [Thu, 25 May 2006 13:53:00 +0000 (15:53 +0200)]
introduce input_eof and ouput_eof
para_filter/para_audiod needs this. For example, it is pointless to
convert more audiod data if the writing application is no longer active.