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 [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 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.
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 [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 [Wed, 24 May 2006 01:29:27 +0000 (03:29 +0200)]
Make para_recv use the new scheduler.
This was pretty straight-forward, but it broke audiod badly. The plan
is first to convert para_filter, then para_audiod. It this works out well,
para_server will be converted as well.
Andre [Tue, 23 May 2006 21:45:42 +0000 (23:45 +0200)]
simplify sched: nuke PRE_EOF_IS_ERROR
Much too simple to get it wrong. Instead, treat zero as success and
make all tasks return negative if they wish to have their error handler
called. A subsequent patch will rename error_handler to event_handler.
Andre [Wed, 17 May 2006 19:22:59 +0000 (21:22 +0200)]
major afs cleanup
This patch makes afs.c the only user of the audio format handler
arry afl[] in order to completely separate audio format handling from
audio file sending.
This is achieved by providing the new helper functions afs_get_header()
and afs_chunk_time(). audio file senders may call these functions
without knowledge of struct audio_format. This allows to get rid of
the "af" parameter for the pre_select and post_select functions of
struct sender.
Related to this cleanup is the removal of match_audio_file_name() from db.c
which also depended on afl[]. This function was essentially identical to
afs.c's guess_audio_format(), so make the latter public and use it from
within db.c.
Andre [Sat, 13 May 2006 23:45:21 +0000 (01:45 +0200)]
improved info status items for the playlist selector
With this patch, the three "dbinfo" status items contain the current
dir, the number of entries in the playlist, and the previous/next
entry in the list.
Andre [Sat, 13 May 2006 04:07:22 +0000 (06:07 +0200)]
aac: make find_stco() return the first offset
rather than the number of offsets which is rather uninteresting.
Also, rename this function to aac_find_entry() and return the
correct number of frames to para_server.
Andre [Sat, 13 May 2006 02:38:26 +0000 (04:38 +0200)]
First version of the aac audio format handler that kinda works.
ATM, only 2 channels, 44100Hz is supported. Still needs more work.
This also fixes two bugs in the error path of aacdec, where positive
values are returned due to a missing "-".