paraslash.git
13 years agothe paraslash-0.4.5 release tarball
Andre Noll [Fri, 17 Dec 2010 16:06:25 +0000 (17:06 +0100)]
the paraslash-0.4.5 release tarball

13 years agoparaslash 0.4.5 v0.4.5
Andre Noll [Fri, 17 Dec 2010 16:02:14 +0000 (17:02 +0100)]
paraslash 0.4.5

13 years agoweb: Remove server side includes.
Andre Noll [Thu, 9 Dec 2010 10:37:17 +0000 (11:37 +0100)]
web: Remove server side includes.

The new apache on systemlinux.org does not have this feature activated.
We don't need it anyway.

13 years agoMerge branch 't/kill_udp_cq'
Andre Noll [Wed, 8 Dec 2010 12:45:42 +0000 (13:45 +0100)]
Merge branch 't/kill_udp_cq'

13 years agoclient: Kill superfluous label "err".
Andre Noll [Mon, 6 Dec 2010 22:05:28 +0000 (23:05 +0100)]
client: Kill superfluous label "err".

The position of this label is identical to the "out" label, and "out"
is more to the point as we jump there not only in case of an error. So
jump always to "out" and remove the "err" label.

13 years agocolor: Simplify color error handling.
Andre Noll [Sun, 21 Nov 2010 20:48:42 +0000 (21:48 +0100)]
color: Simplify color error handling.

We exit on errors anyway, so get rid of the return value of
color_parse() and daemon_set_log_color() and abort immediately rather
than returning -1. Add the familiar "_or_die" suffix to these functions
to make it clear that no error handling is necessary in the caller.

13 years agoNEWS update.
Andre Noll [Sun, 5 Dec 2010 17:52:19 +0000 (18:52 +0100)]
NEWS update.

13 years agoMerge branch 't/writer_cleanups'
Andre Noll [Sun, 5 Dec 2010 17:41:36 +0000 (18:41 +0100)]
Merge branch 't/writer_cleanups'

13 years agoMinor documentation cleanups.
Andre Noll [Sun, 5 Dec 2010 17:38:06 +0000 (18:38 +0100)]
Minor documentation cleanups.

13 years agofecdec: Use a fixed buffer pool size of 64K.
Andre Noll [Sun, 28 Nov 2010 21:43:45 +0000 (22:43 +0100)]
fecdec: Use a fixed buffer pool size of 64K.

With the new variable sized FEC slices, it may happen that the
number of bytes per slice of the first FEC group is very small. It is
therefore no longer appropriate to base the size of the buffer pool
on this quantity. It happened to be much too small (< 1000 bytes)
for one aac file which caused the fecdec filter to abort early due
to a full buffer pool.

This patch uses a fixed buffer pool size of 64K for the fecdec filter,
which ought to be enough for everybody.

13 years agowrite_common: Don't abort if btr_exec_up() failed.
Andre Noll [Sun, 28 Nov 2010 21:32:13 +0000 (22:32 +0100)]
write_common: Don't abort if btr_exec_up() failed.

btr_exec_up() failure is unusual but possible if the upper btr node dies just in
the right moment.  It happened for an aac file due to another bug in the fecdec
filter (fixed in a subsequent patch)  which caused the fecdec and hence the aacdec
btr nodes to unregister themselves due to a full buffer tree pool.

So replace the assertion by a fat error message. This sets the sample rate,
channel count and the sample format to zero which makes the writer unregister
itsself. This is better than aborting.

13 years agofd.c: Fix typo in comment.
Andre Noll [Sun, 28 Nov 2010 21:17:39 +0000 (22:17 +0100)]
fd.c: Fix typo in comment.

13 years agovss: Avoid large FEC parameters for the DCCP transport.
Andre Noll [Mon, 1 Nov 2010 15:30:22 +0000 (16:30 +0100)]
vss: Avoid large FEC parameters for the DCCP transport.

Now that for DCCP streams the audio file header is sent only once at client
connect time, we can go one step further and send the header as its own FEC
group. Then all subsequent FEC groups contain data slices only, hence the
maximal required size for a FEC group reduces from

header_size + largest_chunk_size

to

max(header_size, largest_chunk_size)

This patch introduces a new helper function need_data_slices() which returns
false only at the beginning of a DCCP stream. In this case FEC group 0 consists
of the header only and an arbitrary time interval of 200ms is used for this
group.

13 years agovss: Let the transport specify whether periodic headers are necessary.
Andre Noll [Sun, 17 Oct 2010 09:45:57 +0000 (11:45 +0200)]
vss: Let the transport specify whether periodic headers are necessary.

This adds the new flag need_periodic_header to struct fec_client_parms. It is
true for the UDP transport and false for the DCCP transport.

vss checks this flag in need_audio_header() and does not send the header
periodically if the flag is false.

13 years agowriters: Kill ->open.
Andre Noll [Sat, 6 Nov 2010 10:48:12 +0000 (11:48 +0100)]
writers: Kill ->open.

Now that ->open is a dummy function for all writers, we may safely remove
this method from struct writer and kill the dummy functions.

13 years agoosx_write: Make osx_write_open() a no-op.
Andre Noll [Sat, 6 Nov 2010 10:43:59 +0000 (11:43 +0100)]
osx_write: Make osx_write_open() a no-op.

Move the allocation of the private_osx_write_data struct to core_audio_init()
and adjust the the check whether core audio has been initialized accordingly.

13 years agooss: Make oss_open() a no-op.
Andre Noll [Fri, 5 Nov 2010 18:45:00 +0000 (19:45 +0100)]
oss: Make oss_open() a no-op.

Move the allocation of the private_oss_write_data struct to oss_init() and
adjust the the check whether oss has been initialized accordingly.

13 years agofile_writer: Make file_write_open() a no-op.
Andre Noll [Fri, 5 Nov 2010 18:28:24 +0000 (19:28 +0100)]
file_writer: Make file_write_open() a no-op.

Move the allocation of the private_file_write_data struct to ->post_select()
and adjust the the check whether the output file has already been opened
accordingly.

If the output file has just been opened, pfwd->fd will never be set in
the write fd set of the scheduler, so we can skip this test.

13 years agoalsa: Make alsa_open() a no-op.
Andre Noll [Fri, 5 Nov 2010 18:07:39 +0000 (19:07 +0100)]
alsa: Make alsa_open() a no-op.

Move the allocation of the private_alsa_write_data struct to
->post_select() and adjust the the check whether alsa has
been initialialized accordingly.

13 years agowriters: Unify ->pre_select().
Andre Noll [Fri, 5 Nov 2010 07:45:20 +0000 (08:45 +0100)]
writers:  Unify ->pre_select().

Always treat the easy cases "nothing to do", "error", and "not yet initialized"
first. For the alsa writer,  this change fixes two minor bugs:

First, if data is available but alsa has not yet been initialized, we return
from ->pre_select() without setting a delay. This is wrong, we should init
the alsa handle ASAP in this case.

Second,  on errors we wait 20ms which is both ugly and unnecessary.
Requesting a minimal delay is the right thing to do here as well.

13 years agoChange the ->open method of writers to void.
Andre Noll [Thu, 4 Nov 2010 22:54:23 +0000 (23:54 +0100)]
Change the ->open method of writers to void.

These methods always succeed. Add missing documentation of the public
register_writer_node() function while we're at it.

13 years agofile_write: Fix NULL pointer dereference.
Andre Noll [Thu, 4 Nov 2010 22:34:33 +0000 (23:34 +0100)]
file_write: Fix NULL pointer dereference.

register_writer_node() is the only caller of the ->open method for paraslash
writers. It does not check its return value, which is OK for alsa, oss and osx
as these writer's ->open method always succeeds. However, the ->open() method
of the file writer may fail, for example because the output file could not be
opened. This error will be ignored and the writer node task is registered as
usual with ->fd being initialized to zero.

Fix this bug by splitting the ->open method of the file writer into the part which
merely allocates the private_file_write_data structure, hence always succeeds,
and the part which actually opens the output file. This second part is called later
from ->post_select as soon as there is data available to be written.

After this patch the ->open methods of all writers always succeed and we
may change its return value to void which is done in the next patch.

13 years agowrite_common: Remove check which is never true.
Andre Noll [Thu, 4 Nov 2010 08:12:57 +0000 (09:12 +0100)]
write_common: Remove check which is never true.

All writers have a config parser. This check was bogus anyway: If there was a writer
without config parser and we call it without arguments (i.e. "c" is NULL), this would lead
to a NULL pointer dereference.

13 years agowrite: Simplify config parsers.
Andre Noll [Thu, 4 Nov 2010 07:59:57 +0000 (08:59 +0100)]
write: Simplify config parsers.

These functions all call the gengetopt parser which aborts on errors. It is therefore
pointless to check the return value. Document this fact and make it explicit by renaming
->parse_config of struct writer to ->parse_config_or_die().

13 years agoMinor makesock() fixes.
Andre Noll [Sun, 10 Oct 2010 16:51:17 +0000 (18:51 +0200)]
Minor makesock() fixes.

On getaddrinfo() or setsockopt() errors, we leak the flowopts and/or
the local/remote address info structure. Fix this by jumping to the
cleanup section at the bottom of makesock() rather than returning
early without cleaning up.

Moreover, we can not rely on errno containing a valid error code in the
cleanup part of the function because flowopt_cleanup() calls free()
which usually resets errno. So use the error code provided via "rc"
if possible and fall back to the new -E_MAKESOCK if rc is non-negative
to make sure we return a negative value on errors.

13 years agoNEWS update.
Andre Noll [Sun, 14 Nov 2010 14:35:33 +0000 (15:35 +0100)]
NEWS update.

13 years agoMerge branch 't/server_optional'
Andre Noll [Sun, 14 Nov 2010 14:32:45 +0000 (15:32 +0100)]
Merge branch 't/server_optional'

13 years agomanual: Add a section on rebuild of the "next" branch.
Andre Noll [Sun, 31 Oct 2010 12:20:30 +0000 (13:20 +0100)]
manual: Add a section on rebuild of the "next" branch.

13 years agoNEWS update.
Andre Noll [Sun, 31 Oct 2010 11:59:11 +0000 (12:59 +0100)]
NEWS update.

13 years agoMake build of para_server optional.
Andre Noll [Sun, 12 Sep 2010 21:30:59 +0000 (23:30 +0200)]
Make build of para_server optional.

para_server is the only executables which requires libosl, so do not consider
it a fatal error if libosl could not be located. This allows to build the
paraslash package for example on client-only machines which do not need
para_server anyway.

13 years agochunk_queue: Remove cq_force_enqueue().
Andre Noll [Wed, 6 Oct 2010 22:08:48 +0000 (00:08 +0200)]
chunk_queue: Remove cq_force_enqueue().

It was only used by the UDP sender which does not use chunk queueing
any more.

13 years agoudp: Remove chunk queueing.
Andre Noll [Wed, 6 Oct 2010 22:08:31 +0000 (00:08 +0200)]
udp: Remove chunk queueing.

This was broken beyond repair for several reasons:

First of all, not each write to a UDP socket with no listener on
the remote leads to a write error. For a local connection on Linux,
only each second write yields ECONNREFUSED while all others seem to
succeed. So we would only queue each second FEC slice which is next
to useless.

Secondly, only buffer references are stored in the chunk queue, the
buffer contents are not copied for performance reasons. This works fine
if the buffers point to the read-only memory map of the audio file,
which is the case for the HTTP sender, but not for the UDP sender.
In fact, for UDP the buffer is always the same, namely ->enc_buf of
the FEC client struct for the UDP target.

Finally, it is not clear that the buffer references stored in the chunk
queue are still valid when the chunk queue is emptied by sending the
buffers since vss.c might have realloced the enc_buf.

So remove that broken code and be happy.

13 years agoudp: Also send the EOF packet when a target is removed.
Andre Noll [Wed, 6 Oct 2010 21:38:17 +0000 (23:38 +0200)]
udp: Also send the EOF packet when a target is removed.

This notifies the client of the EOF condition and causes it to remove
its buffer tree.  Without this patch, the client keeps listening
which can lead to problems when the target is added later while a
different audio file is being streamed.

Also there is no point to check twice whether the chunk queue exists.

13 years agoRemove unused field "sc" of struct udp_target.
Andre Noll [Wed, 6 Oct 2010 21:23:19 +0000 (23:23 +0200)]
Remove unused field "sc" of struct udp_target.

All functions get/pass a struct sender_client which contains a struct
udp_target as its private data, but we never need to get the struct
sender_client from a struct udp_target. So the sc pointer is unnecessary.

13 years agoudp_send: Add/remove the udp socket fd only once.
Andre Noll [Wed, 6 Oct 2010 20:56:23 +0000 (22:56 +0200)]
udp_send: Add/remove the udp socket fd only once.

Currently, we remove this fd from the close-on-fork list in
udp_close_target() and re-add it in udp_init_session(). This is wrong
because we want the fd being closed in the command handlers also if
the child process for the command is spawned while the udp sender
is inactive.

So add/delete the fd when the udp target is added/removed rather than
on a per session basis.

13 years agoFix a fd leak in the udp sender.
Andre Noll [Wed, 6 Oct 2010 20:51:30 +0000 (22:51 +0200)]
Fix a fd leak in the udp sender.

When deleting the UDP target, we forgot to close the socket fd.

13 years agovss: Avoid potential double free of FEC parameters.
Andre Noll [Mon, 16 Aug 2010 07:29:59 +0000 (09:29 +0200)]
vss: Avoid potential double free of FEC parameters.

If an error occurs in initialize_fec_client() we free the FEC parameter
structure but do not invalidate it. It's both easier and safer to
free this struct just before allocating it.

13 years agoIntroduce per group slice sizes.
Andre Noll [Sat, 7 Aug 2010 16:36:45 +0000 (18:36 +0200)]
Introduce per group slice sizes.

While the FEC parameters k and n are fixed, the size of a FEC slice may
be different for each FEC group. This patch exploits this freedom and
implements variable sized FEC slices for the DCCP and UDP transports.

Two new functions, compute_group_size() and compute_slice_size(),
are introduced which try to compute an optimal size for the entire
FEC group and the slice size of the group respectively.

The group size is chosen such that the group duration is approximately
150ms. Larger values cause too much latency while smaller groups use
the available bandwidth ineffectively. Several contraints such as
the maximal packet size are taken into account when computing the
group size.

Once the group size is known, a suitable slice size is chosen. It
should be as small as possible to avoid unnecessary FEC calculations
but must be large enough to guarantee that the k data slices suffice
to encode the header (if needed) and the data chunk(s).

13 years agovss: need_audio_header(): Change return value to bool.
Andre Noll [Sat, 7 Aug 2010 16:33:04 +0000 (18:33 +0200)]
vss: need_audio_header(): Change return value to bool.

Obviously an equivalent transformation.

13 years agoCompute the maximal chunk size only once.
Andre Noll [Sat, 7 Aug 2010 15:46:44 +0000 (17:46 +0200)]
Compute the maximal chunk size only once.

This patch adds the new field max_chunk_size to struct audio_file_data.
It is initialized in the afs process when the chunk table is saved,
just before the audio_file_data struct is passed to the server process.

The vss code benefits from this change since it can just use the
new information rather than calling afh_get_largest_chunk_size()
to recompute the maximal chunk size from scratch whenever a new
client connects.

Since vss.c was the only user of afh_get_largest_chunk_size(), we
may kill this function.

13 years agoReplace ROUND_UP by DIV_ROUND_UP and use it everywhere.
Andre Noll [Sat, 7 Aug 2010 15:07:12 +0000 (17:07 +0200)]
Replace ROUND_UP by DIV_ROUND_UP and use it everywhere.

13 years agoRemove FEC parameter max_slice_bytes.
Andre Noll [Sat, 24 Jul 2010 18:11:08 +0000 (20:11 +0200)]
Remove FEC parameter max_slice_bytes.

It is no longer a FEC parameter as its value is determined at runtime
from the MPS of the connection.

So replace ->max_slice_bytes of struct fec_client_parms by the new
->mps field of struct fec_client.

13 years agoSimplify vss_send().
Andre Noll [Sat, 24 Jul 2010 16:52:37 +0000 (18:52 +0200)]
Simplify vss_send().

13 years agoReplace check for stream_chunk < 0 by state == NONE.
Andre Noll [Sat, 24 Jul 2010 16:46:25 +0000 (18:46 +0200)]
Replace check for stream_chunk < 0 by state == NONE.

The two conditions are equivalent but the latter form is more readable.

13 years agoFEC initialization cleanups.
Andre Noll [Sat, 7 Aug 2010 14:50:59 +0000 (16:50 +0200)]
FEC initialization cleanups.

Initialization was performed in two steps: During vss_send and
during compute_next_fec_slice(). This patch moves the init code
for fec clients to the single location.

13 years agovss: Cleanup num_slices().
Andre Noll [Sat, 7 Aug 2010 14:45:41 +0000 (16:45 +0200)]
vss: Cleanup num_slices().

This makes num_slices() take ints rather than uint8_t arguments which
avoids nasty integer overflows and allows to drop the result parameter
since the result is now contained in the return value.

Moreover, num_slices() now takes the number of redundant slices as
an additional argument, so that this value has to be comuted only
once in the caller.

13 years agoNEWS update.
Andre Noll [Sun, 24 Oct 2010 11:58:12 +0000 (13:58 +0200)]
NEWS update.

13 years agoMerge branch 't/sched_cleanups'
Andre Noll [Sun, 17 Oct 2010 11:04:55 +0000 (13:04 +0200)]
Merge branch 't/sched_cleanups'

13 years agopara.h, recv.h: Move parts marked with \cond to bottom.
Andre Noll [Mon, 11 Oct 2010 20:38:38 +0000 (22:38 +0200)]
para.h, recv.h: Move parts marked with \cond to bottom.

This makes doxygen much happier as it does no longer spit out
tons of messages like

warning: documentation for unknown define VERSION_TEXT found.

13 years agoMerge remote branch 'refs/remotes/fml/master'
Andre Noll [Mon, 11 Oct 2010 19:21:57 +0000 (21:21 +0200)]
Merge remote branch 'refs/remotes/fml/master'

13 years agoudp_recv: Add missing line break in log messages.
Andre Noll [Mon, 11 Oct 2010 19:15:12 +0000 (21:15 +0200)]
udp_recv: Add missing line break in log messages.

Also reduce the line length a bit and fix a whitespace issue.

13 years agopara.h: Fix typo in comment.
Andre Noll [Mon, 11 Oct 2010 13:38:12 +0000 (15:38 +0200)]
para.h: Fix typo in comment.

13 years agoweb/download.html: Recommend downloading the snapshot tarball.
Andre Noll [Sun, 10 Oct 2010 20:02:14 +0000 (22:02 +0200)]
web/download.html: Recommend downloading the snapshot tarball.

Mention that the git tarball is a snapshot of the master branch and
is expected to be more stable than the released versions.

13 years agoNEWS update.
Andre Noll [Sun, 10 Oct 2010 19:43:52 +0000 (21:43 +0200)]
NEWS update.

13 years agodccp_send: Fix com_off().
Andre Noll [Sun, 10 Oct 2010 19:37:03 +0000 (21:37 +0200)]
dccp_send: Fix com_off().

This command made para_server sefgault due to the FEC client structure being
freed, but still used from vss.c. Fix this serious bug by first calling
dccp_shutdown_clients() which removes all FEC clients.

13 years agoaudiod: Handle crashes of para_server more robustly.
Andre Noll [Sun, 10 Oct 2010 19:32:58 +0000 (21:32 +0200)]
audiod: Handle crashes of para_server more robustly.

In case para_server dies unexpectedly, para_audiod may still have a partial status
item in the buffer tree node of the client task which can lead to a busy loop.

Fix this by flushing the input queue and invalidate the current audio format to prevent
recreating a buffer tree before the status task resumes.

There is already flush_input_queue() in buffer_tree.c but that can't be called by audiod.c
as it is a static function. Make it public and rename it to btr_drain() which is shorter and
more to the point and has the usual btr_ prefix.

13 years agoAdd missing documentation of moods_event_handler() and btr_free_node().
Andre Noll [Sun, 10 Oct 2010 16:17:53 +0000 (18:17 +0200)]
Add missing documentation of moods_event_handler() and btr_free_node().

13 years agoconnect_local_socket(): Silence noisy debug message.
Andre Noll [Tue, 5 Oct 2010 06:10:54 +0000 (08:10 +0200)]
connect_local_socket(): Silence noisy debug message.

13 years agosched: Use built-in instead of open-coded timeout helpers.
Andre Noll [Sun, 1 Aug 2010 17:56:10 +0000 (19:56 +0200)]
sched: Use built-in instead of open-coded timeout helpers.

In many places, sched_min_delay() or sched_request_timeout() are
open-coded.  Use the corresponding helpers from sched.c instead and
rename the "timeout" parameter of sched_request_timeout() to avoid
warnings on old gcc versions.

13 years agoImprove filter help text.
Andre Noll [Mon, 23 Aug 2010 13:25:07 +0000 (15:25 +0200)]
Improve filter help text.

- Mention that "efficient way" means zero-copy,

- Replace "filter options" by "options for a particular filter",

- Replace -f by --filter.

13 years agonet: Rename create_remote_socket() connect_local_socket().
Andre Noll [Mon, 23 Aug 2010 13:14:48 +0000 (15:14 +0200)]
net: Rename create_remote_socket() connect_local_socket().

It's all about local unix domain sockets, so avoid the word
"remote". Also, this function does not create the socket special
in /var/paraslash.

13 years agofade: Print the mixer device.
Andre Noll [Mon, 23 Aug 2010 11:39:16 +0000 (13:39 +0200)]
fade: Print the mixer device.

Otherwise the error "no such file" can be misleading.

13 years agoafh: Chunk numbers are zero-based.
Andre Noll [Tue, 17 Aug 2010 20:11:24 +0000 (22:11 +0200)]
afh: Chunk numbers are zero-based.

This makes the numbers match what para_server logs.

13 years agoFix an invalid-free-bug in the ogg audio format handler code.
Andre Noll [Mon, 9 Aug 2010 22:15:04 +0000 (00:15 +0200)]
Fix an invalid-free-bug in the ogg audio format handler code.

In process_ogg_packets(), if ogg_sync_pageout() fails, we jmp to
the out label where "stream" is being freed by ogg_stream_clear()
without being initialized.

This causes para_afh and para_server to segfault in libogg:

*** glibc detected *** para_afh: munmap_chunk(): invalid pointer: 0x6f890d42 ***
======= Backtrace: =========
/usr/lib/glibc/lib/libc.so.6(+0x66e5a)[0x6f712e5a]
/usr/lib/glibc/lib/libc.so.6(+0x68021)[0x6f714021]
/usr/local/lib/libogg.so.0(ogg_stream_clear+0x2f)[0x6f891adf]
para_afh[0x804cb52]
para_afh[0x804cbeb]
para_afh[0x804ce59]
para_afh[0x804be71]
para_afh[0x804a97c]
/usr/lib/glibc/lib/libc.so.6(__libc_start_main+0xd9)[0x6f6c2c79]
para_afh[0x8049991]

Fix this bug by returning the error code directly rather than jumping
to "out".

13 years agonew codename, reset version to git
Andre Noll [Fri, 6 Aug 2010 12:13:56 +0000 (14:13 +0200)]
new codename, reset version to git

13 years agothe paraslash-0.4.4 release tarball
Andre Noll [Fri, 6 Aug 2010 12:09:52 +0000 (14:09 +0200)]
the paraslash-0.4.4 release tarball

13 years agoparaslash 0.4.4 v0.4.4
Andre Noll [Fri, 6 Aug 2010 12:05:04 +0000 (14:05 +0200)]
paraslash 0.4.4

13 years agomanual: Minor cleanups.
Andre Noll [Mon, 2 Aug 2010 07:12:16 +0000 (09:12 +0200)]
manual: Minor cleanups.

- Mention that OGG/Speex also needs periodic audio file headers, reword
this sentence.

- para_write now understands formats != 16 bit, so remove this restriction also
from the documentation. Also mention that the sample format is being read from
the wav header, if present.

- Typo fix.

13 years agoFix typo in write_common.h.
Andre Noll [Sun, 1 Aug 2010 17:48:30 +0000 (19:48 +0200)]
Fix typo in write_common.h.

This makes doxygen happy again.

13 years agoRename some variables to avoid warnings on old gcc versions.
Andre Noll [Sun, 1 Aug 2010 17:46:32 +0000 (19:46 +0200)]
Rename some variables to avoid warnings on old gcc versions.

Fortunately, gcc-4 no longer warns on these. However, gcc-3.3 is still supported
for compiling paraslash, so rename "index" to "idx" and "conf" to "config" to get
rid of warnings of the form

wmadec_filter.c:1013: warning: declaration of `index' shadows a global declaration

Add documentation of ->free_config() while we're at it.

13 years agoNEWS update.
Andre Noll [Sun, 1 Aug 2010 17:38:33 +0000 (19:38 +0200)]
NEWS update.

13 years agoMerge branch 't/speex'
Andre Noll [Sun, 1 Aug 2010 11:26:42 +0000 (13:26 +0200)]
Merge branch 't/speex'

13 years agoMerge branch 't/error2'
Andre Noll [Sun, 1 Aug 2010 11:25:59 +0000 (13:25 +0200)]
Merge branch 't/error2'

13 years agoNEWS update
Andre Noll [Thu, 29 Jul 2010 18:55:12 +0000 (20:55 +0200)]
NEWS update

13 years agoMerge branch 't/bits_per_sample'
Andre Noll [Thu, 29 Jul 2010 18:52:06 +0000 (20:52 +0200)]
Merge branch 't/bits_per_sample'

13 years agoalsa: Add a missing "goto again" statement.
Andre Noll [Mon, 26 Jul 2010 11:02:56 +0000 (13:02 +0200)]
alsa: Add a missing "goto again" statement.

Without this the return value of btr_node_status() might be incorrect
as the wrong minimal input queue size was used.

13 years agoAdd a reference to the speex home page.
Andre Noll [Thu, 29 Jul 2010 16:25:41 +0000 (18:25 +0200)]
Add a reference to the speex home page.

Also mention the name of the speex Debian package.

13 years agoAdd missing documentation of rfds parameter of accept_sender_client().
Andre Noll [Tue, 27 Jul 2010 21:19:31 +0000 (23:19 +0200)]
Add missing documentation of rfds parameter of accept_sender_client().

Fixes

/home/work/maan/scm/paraslash/send_common.c:260: warning: The following parameters of accept_sender_client(struct sender_status *ss, fd_set *rfds) are not documented:
parameter 'rfds'

13 years agoaacdec: Fix a brown paper bag bug.
Andre Noll [Mon, 26 Jul 2010 11:05:42 +0000 (13:05 +0200)]
aacdec: Fix a brown paper bag bug.

Oops, we were using PARA_MAX() instead of PARA_MIN() to determine
the number of bytes to convert in the next run.  This silly bug could
lead to a segfault in the aacdec filter. Moreover, the assertion in
buffer_tree.c that would have caught the bug was _also_ b0rken.

But it's not my fault. I blame Grover of the Sesame street for both
bugs. He did explain the difference between near and far, although
this knowledge is next to useless for a programmer. And he did not
say a single word about MIN and MAX, or true and false. No wonder
such bugs happen.

13 years agoMake autoconf-2.66 happy.
Andre Noll [Mon, 5 Jul 2010 21:42:31 +0000 (23:42 +0200)]
Make autoconf-2.66 happy.

This removes more lines than it adds and avoids the following warning;

configure.ac:689: warning: AC_DEFINE_UNQUOTED: `
configure.ac:689:       result=
configure.ac:689:       for i in $status_items; do
configure.ac:689:               result="$result SI_$(echo $i | tr 'a-z' 'A-Z')' is not a valid preprocessor define value

13 years agoUse a perl script to create error2.h
Andre Noll [Sun, 4 Jul 2010 09:23:28 +0000 (11:23 +0200)]
Use a perl script to create error2.h

This is *much* faster than the shell code in configure. Perl is
required anyway for help2man, so this patch does not introduce
additional requirements on the build system.

13 years agoAdd support for the speex codec.
Andre Noll [Tue, 22 Jun 2010 22:53:46 +0000 (00:53 +0200)]
Add support for the speex codec.

This patch adds support for yet another audio format: speex, a
CELP-based codec designed for speech.

As speex is usually used in combination with the OGG container format,
we only support this combination. The new OGG/Speex audio format
handler provides a callback structure for the generic ogg code,
very similar to the OGG/Vorbis audio format handler.

The new speex code is split over three source files: spx_afh.c contains
the audio format handler, spxdec_filter.c the decoder and spx_common.c
common functions used by both audio format handler and decoder.

Many thanks to Jean-Marc Valin, the author of the reference
implementation of the speex decoder. Reusing parts of his code made
it easy to support speex within paraslash.

13 years agoogg: Separate ogg from vorbis code.
Andre Noll [Tue, 22 Jun 2010 21:14:03 +0000 (23:14 +0200)]
ogg: Separate ogg from vorbis code.

This moves vorbis-independent code from ogg_afh.c to the new file
ogg_afh_common.c so that it can be used also for the speex audio
format handler that is added by subsequent patches.

The patch introduces a generic callback structure which contains a
function pointer used to call back into the vorbis code once for each
of the three ogg packets of the audio file header.

13 years agoKill supported_audio_formats().
Andre Noll [Tue, 22 Jun 2010 20:00:28 +0000 (22:00 +0200)]
Kill supported_audio_formats().

It's kind of silly to have a function that just returns a constant string
which is known at compile time. Even more silly is to contruct this string
using an #ifdef for each optional audio format when we already
constructed the space-separated list of supported audio formats during
configure.

So just use AC_DEFINE_UNQUOTED() in configure.ac to make the
list of supported audio formats available via config.h and get rid of
supported_audio_formats(). Rename it to SERVER_AUDIO_FORMATS
and kill a useless space character while we're at it.

13 years agoContent complete, some external links missing.
Andre Noll [Mon, 3 May 2010 06:57:10 +0000 (08:57 +0200)]
Content complete, some external links missing.

13 years agoCosmetics: Rename samplerate to sample_rate.
Andre Noll [Wed, 30 Jun 2010 12:09:56 +0000 (14:09 +0200)]
Cosmetics: Rename samplerate to sample_rate.

A subsequent patch will introduce sample_format which looks much nicer
than sampleformat. So let's use the underscored variant throughout.

13 years agowrite: Support audio formats != 16 bit little endian.
Andre Noll [Mon, 12 Jul 2010 15:28:58 +0000 (17:28 +0200)]
write: Support audio formats != 16 bit little endian.

This adds the new --sample_format option to para_write and teaches
the check_wav_task to read the sample format from the wav header
rather than assuming 16 bit little endian.

The alsa, oss and osx writers all ask the upper buffer tree nodes
for the current audio format. For para_write the check_wav task
answers this query by using the value given at the command line,
looking at the wav header, or using 16 bit little endian as the
default answer.

For para_audiod, the current decoder answers this query. In this
case the audio format is either 16 bit little endian or 16 bit
big endian, depending on the endianness of the machine.

13 years agowrite: Make get_btr_value() return void.
Andre Noll [Thu, 1 Jul 2010 09:44:16 +0000 (11:44 +0200)]
write: Make get_btr_value() return void.

Asking upper buffer tree nodes for the sample rate and the channels
count should never fail, because the writer only asks if there is
already some output data to process.

So, replace the tests by assertions, change the return value
of get_btr_value() to void and fix up all callers accordingly.
This simplifies the code a bit.

13 years agoIntroduce decoder_execute().
Andre Noll [Wed, 30 Jun 2010 17:04:30 +0000 (19:04 +0200)]
Introduce decoder_execute().

All four decoders support the same two commands: "sample_rate"
and "channels". This patch adds a public function to filter_common.c
which implements these two commands and is called by all decoders.
This allows to kill four copies of code with identical functionality.

13 years agoDeduplicate --channels and --sample-rate.
Andre Noll [Wed, 30 Jun 2010 16:40:47 +0000 (18:40 +0200)]
Deduplicate --channels and --sample-rate.

These options are identical for all writers. Moreover, they only
make sense for para_write but are ignored for para_audiod.

So move these options from the writer-specific ggo file to write.m4,
the config file for para_write. The writers obtain the sample rate
and the channels count as before via the buffer tree exec mechanism,
but it is now the check_wav node rather than the btr node of the writer
that computes this information from the given option, the wav header
or the builtin default.

The new HANDLE_EXEC macro contains the logic for determining the
source of both the sample rate and the channels count.

13 years agoCosmetics: Rename samplerate to sample_rate.
Andre Noll [Wed, 30 Jun 2010 12:09:56 +0000 (14:09 +0200)]
Cosmetics: Rename samplerate to sample_rate.

A subsequent patch will introduce sample_format which looks much nicer
than sampleformat. So let's use the underscored variant throughout.

13 years agofilter.h: Add some missing documentation.
Andre Noll [Sat, 10 Jul 2010 11:24:36 +0000 (13:24 +0200)]
filter.h: Add some missing documentation.

13 years agonew codename, reset version to git
Andre Noll [Mon, 5 Jul 2010 15:29:59 +0000 (17:29 +0200)]
new codename, reset version to git

13 years agothe paraslash-0.4.3 release tarball
Andre Noll [Mon, 5 Jul 2010 15:25:03 +0000 (17:25 +0200)]
the paraslash-0.4.3 release tarball

13 years agoparaslash 0.4.3 v0.4.3
Andre Noll [Mon, 5 Jul 2010 15:19:12 +0000 (17:19 +0200)]
paraslash 0.4.3

13 years agoRemove some unused error codes.
Andre Noll [Mon, 5 Jul 2010 06:19:53 +0000 (08:19 +0200)]
Remove some unused error codes.

13 years agoaudiod: Set the audio format restart barrier also when closing the receiver.
Andre Noll [Sun, 4 Jul 2010 21:27:37 +0000 (23:27 +0200)]
audiod: Set the audio format restart barrier also when closing the receiver.

When the current audio file changes, it may happen that para_audiod's receiver
detects the EOF condition before the status has been updated to reflect the file
change. In this case, para_audiod might restart the old receiver even if a
different audio format is about to be streamed next.

This patch adds a per audio format 200ms delay which starts at receiver close time.
During this time interval the receiver for this audio format will not be started again.

13 years agogui: Replace also \r and \f by spaces.
Andre Noll [Sun, 4 Jul 2010 21:17:41 +0000 (23:17 +0200)]
gui: Replace also \r and \f by spaces.

id3 comments might contain these characters which can mess up the curses output.

13 years agooggdec: Introduce a small delay on stream start.
Andre Noll [Sun, 4 Jul 2010 21:16:01 +0000 (23:16 +0200)]
oggdec: Introduce a small delay on stream start.

This patch avoids buffer underruns when using the http receiver.

13 years agoSuppress gcc warning when compiling cmdline files.
Andre Noll [Tue, 29 Jun 2010 06:35:45 +0000 (08:35 +0200)]
Suppress gcc warning when compiling cmdline files.

Use -Wno-unused-function when compiling *.cmdline.o files
to get rid of the annoying warning

cmdline/mp3dec_filter.cmdline.c:174:1: warning: 'free_string_field' defined but not used