paraslash.git
14 years agowmadec: Kill non-btr code.
Andre Noll [Tue, 12 Jan 2010 03:36:37 +0000 (04:36 +0100)]
wmadec: Kill non-btr code.

14 years agoFecdec: Kill non-btr code.
Andre Noll [Tue, 12 Jan 2010 03:33:23 +0000 (04:33 +0100)]
Fecdec: Kill non-btr code.

14 years agofilter: Print meaningful error message if no filter options are given.
Andre Noll [Tue, 12 Jan 2010 03:28:02 +0000 (04:28 +0100)]
filter: Print meaningful error message if no filter options are given.

14 years agoamp: Kill non-btr code.
Andre Noll [Tue, 12 Jan 2010 03:11:09 +0000 (04:11 +0100)]
amp: Kill non-btr code.

14 years agowav_filter: Kill non-btr code.
Andre Noll [Tue, 12 Jan 2010 01:11:22 +0000 (02:11 +0100)]
wav_filter: Kill non-btr code.

14 years agocompress: Kill non-btr code.
Andre Noll [Tue, 12 Jan 2010 01:03:53 +0000 (02:03 +0100)]
compress: Kill non-btr code.

14 years agofilter: Remove non-btr code.
Andre Noll [Tue, 12 Jan 2010 00:47:47 +0000 (01:47 +0100)]
filter: Remove non-btr code.

This paves the street for further filter cleanups which will finally
result in the removal of struct filter_chain.

14 years agoaudiod.h: Remove unused slot_info->fc.
Andre Noll [Tue, 12 Jan 2010 00:43:30 +0000 (01:43 +0100)]
audiod.h: Remove unused slot_info->fc.

14 years agovss: Fix offset handling.
Andre Noll [Tue, 12 Jan 2010 00:10:36 +0000 (01:10 +0100)]
vss: Fix offset handling.

Commit fb6d93240 (vss: Update offset directly when setting the REPOS
flag.) was buggy. On pause/restart we miss to update mmd->offset,
hence the status items which are sent to the stat clients like audiod
did not contain the correct offset value either which messes up
the time string that audiod sends to its clients (para_gui).

We need to set the new offset both on repos requests and on restart,
do introduce a small helper function for this purpose.

14 years agoaudiod: Fix a bug in try_to_close_slot() for default config.
Andre Noll [Tue, 12 Jan 2010 00:01:34 +0000 (01:01 +0100)]
audiod: Fix a bug in try_to_close_slot() for default config.

If the default writer is used because no --writer option was given,
a->num_writers is zero although we have one (the default) writer.
Handle this case correctly to avoid starting the receiver too early.

14 years agoaudiod: Don't open the receiver too early.
Andre Noll [Mon, 11 Jan 2010 23:59:16 +0000 (00:59 +0100)]
audiod: Don't open the receiver too early.

Also use sched_request_timeout() instead of setting the timeout
directly.

14 years agoaudiod _close_filters(): Don't segfault if fn is NULL.
Andre Noll [Mon, 11 Jan 2010 23:57:24 +0000 (00:57 +0100)]
audiod _close_filters(): Don't segfault if fn is NULL.

14 years agoaudiod: Make writer_cleanup() accept NULL pointer argument.
Andre Noll [Mon, 11 Jan 2010 23:55:59 +0000 (00:55 +0100)]
audiod: Make writer_cleanup() accept NULL pointer argument.

14 years agoaudiod: Fix time string.
Andre Noll [Mon, 11 Jan 2010 01:51:08 +0000 (02:51 +0100)]
audiod: Fix time string.

Copy the data which is relevant for generating the string at writer
node start time, i.e. when the writer produced its first output.

14 years agoaudiod: Timing fixes.
Andre Noll [Mon, 11 Jan 2010 00:06:39 +0000 (01:06 +0100)]
audiod: Timing fixes.

14 years agoudp_recv: Loglevel adjustments.
Andre Noll [Mon, 11 Jan 2010 00:03:58 +0000 (01:03 +0100)]
udp_recv: Loglevel adjustments.

14 years agosched: Add some helper functions.
Andre Noll [Mon, 11 Jan 2010 00:03:11 +0000 (01:03 +0100)]
sched: Add some helper functions.

14 years ago[btr] Export btr_pool_size().
Andre Noll [Sun, 10 Jan 2010 18:53:22 +0000 (19:53 +0100)]
[btr] Export btr_pool_size().

14 years agograb: Implement -n option to specify the name of the btrn.
Andre Noll [Sun, 10 Jan 2010 18:52:19 +0000 (19:52 +0100)]
grab: Implement -n option to specify the name of the btrn.

14 years agoAdd E_STDIN_OVERRUN error code.
Andre Noll [Sun, 10 Jan 2010 18:50:56 +0000 (19:50 +0100)]
Add E_STDIN_OVERRUN error code.

14 years agostdout: Try to write as much as possible in one go.
Andre Noll [Sun, 10 Jan 2010 18:49:58 +0000 (19:49 +0100)]
stdout: Try to write as much as possible in one go.

14 years agostdin: Use buffer pools.
Andre Noll [Sun, 10 Jan 2010 17:40:40 +0000 (18:40 +0100)]
stdin: Use buffer pools.

This introduces a memory leak to be fixed in a subsequent patch (the
buffer pool can not be freed in post_select() because there might
still be references to its area).

14 years ago[btr]: Avoid large memcpy()s when creating the wrap buffers.
Andre Noll [Sun, 10 Jan 2010 17:22:49 +0000 (18:22 +0100)]
[btr]: Avoid large memcpy()s when creating the wrap buffers.

14 years agoMajor grab_client cleanups.
Andre Noll [Sun, 10 Jan 2010 04:07:59 +0000 (05:07 +0100)]
Major grab_client cleanups.

- Move struct declarations from grab_client.h to grab_client.c.

- Kill init_grabbing(). We can do this at compile time.

- Rename some functions and improve documentation.

14 years agoFix stream grabbing.
Andre Noll [Sun, 10 Jan 2010 03:30:45 +0000 (04:30 +0100)]
Fix stream grabbing.

The new code uses a buffer tree node which is inserted into an existing
buffer tree if possible, or put to the inactive list.

The grab command now takes the name of an existing parent node. The new
grab client node will be inserted as a child of this parent node.

14 years agobtr_node_status(): Do not segfault if btrn is NULL.
Andre Noll [Sun, 10 Jan 2010 03:25:16 +0000 (04:25 +0100)]
btr_node_status(): Do not segfault if btrn is NULL.

14 years agoMinor logging and documentation updates.
Andre Noll [Sat, 9 Jan 2010 21:34:22 +0000 (22:34 +0100)]
Minor logging and documentation updates.

14 years agoAdd btr pool support to the fecdec filter.
Andre Noll [Sat, 9 Jan 2010 21:25:17 +0000 (22:25 +0100)]
Add btr pool support to the fecdec filter.

The consumers of the output of fecdec are typically the decoders
which have requirements on the minimal amount of data available
in one chunk. Using a buffer pool minimizes the number of memcpy()
operations needed during btr_merge when the current buffer is too small.

To fit the needs of fecdec, a new function btr_copy() is introduced
which copies a data buffer into the btr pool area and generates
btr buffers and references. btr_add_output_pool() had to be adjusted
a bit and all callers have been changed to match.

The patch also adds a new field "name" to the buffer_pool structure.
This makes the log output more readable.

14 years agoudp_recv: Use buffer pool API.
Andre Noll [Sat, 9 Jan 2010 17:41:07 +0000 (18:41 +0100)]
udp_recv: Use buffer pool API.

Although fecdec, the filter receiving the output of the udp receiver,
does not strictly benefit from this change, using buffer pools in
receivers has the advantage that we don't need to guess the input
buffer size or call realloc() after the receive to shrink the buffer.

14 years agoImplement buffer tree pool support.
Andre Noll [Sat, 9 Jan 2010 01:28:15 +0000 (02:28 +0100)]
Implement buffer tree pool support.

Using a buffer pool avoids quite some uses of memcpy() and memmove().
This patch also switches over the http receiver to use buffer pools.

14 years agoaudiod: Kill noisy debug message.
Andre Noll [Sat, 9 Jan 2010 01:24:02 +0000 (02:24 +0100)]
audiod: Kill noisy debug message.

14 years agomp3dec: Improve error message.
Andre Noll [Sat, 9 Jan 2010 00:31:38 +0000 (01:31 +0100)]
mp3dec: Improve error message.

14 years agooggdec fixes.
Andre Noll [Sat, 9 Jan 2010 00:31:16 +0000 (01:31 +0100)]
oggdec fixes.

If opening the stream fails because the segment available is too small,
we must not consume this data, which is what cb_read_btr() does
unconditionally.

Make it store the number of consumed bytes in pod->converted and consume
from ogg_init() and ogg_post_select() instead.

14 years agoamp filter fixes.
Andre Noll [Fri, 8 Jan 2010 19:06:05 +0000 (20:06 +0100)]
amp filter fixes.

- Avoid double free.
- Print correct amplification value in log message.

14 years agoSwitch audiod over to the buffer tree API.
Andre Noll [Wed, 6 Jan 2010 23:48:47 +0000 (00:48 +0100)]
Switch audiod over to the buffer tree API.

Still a bit rough and there are too many btr merges.

14 years agovss: Update offset directly when setting the REPOS flag.
Andre Noll [Wed, 6 Jan 2010 23:45:25 +0000 (00:45 +0100)]
vss: Update offset directly when setting the REPOS flag.

This way, the new offset is used during the next announce period.

14 years agosched.h: Explicitely mention size of task status buffer.
Andre Noll [Wed, 6 Jan 2010 23:42:10 +0000 (00:42 +0100)]
sched.h: Explicitely mention size of task status buffer.

14 years agosched: Update "now" also after post_select.
Andre Noll [Wed, 6 Jan 2010 23:40:57 +0000 (00:40 +0100)]
sched: Update "now" also after post_select.

14 years agooggdec: Move init into a separate function.
Andre Noll [Wed, 6 Jan 2010 23:35:55 +0000 (00:35 +0100)]
oggdec: Move init into a separate function.

14 years agoaacdec: Reset "consumed" at each iteration.
Andre Noll [Wed, 6 Jan 2010 23:25:14 +0000 (00:25 +0100)]
aacdec: Reset "consumed" at each iteration.

14 years agobtr support for the fecdec filter.
Andre Noll [Tue, 5 Jan 2010 22:08:36 +0000 (23:08 +0100)]
btr support for the fecdec filter.

14 years agoFix a bug in the compress filter in case of odd buffer sizes.
Andre Noll [Tue, 5 Jan 2010 22:07:29 +0000 (23:07 +0100)]
Fix a bug in the compress filter in case of odd buffer sizes.

14 years agofilter: Fix a memory leak in non-btr mode.
Andre Noll [Tue, 5 Jan 2010 22:06:45 +0000 (23:06 +0100)]
filter: Fix a memory leak in non-btr mode.

14 years agostdin: Always set t->error correctly.
Andre Noll [Tue, 5 Jan 2010 22:05:58 +0000 (23:05 +0100)]
stdin: Always set t->error correctly.

14 years agobtr support for the UDP receiver.
Andre Noll [Tue, 5 Jan 2010 19:38:39 +0000 (20:38 +0100)]
btr support for the UDP receiver.

14 years agoIntroduce generic_recv_pre_select().
Andre Noll [Tue, 5 Jan 2010 18:39:33 +0000 (19:39 +0100)]
Introduce generic_recv_pre_select().

14 years agorecv improvements.
Andre Noll [Tue, 5 Jan 2010 18:20:54 +0000 (19:20 +0100)]
recv improvements.

- Fix some memory leaks.
- kill http_recv's -B option.
- Move btr node creation to recv.c.

14 years ago[btr] Add the node type parameter to btr_node_status().
Andre Noll [Tue, 5 Jan 2010 18:04:04 +0000 (19:04 +0100)]
[btr] Add the node type parameter to btr_node_status().

This allows to have a single function which can be called from
both the pre_select and the post_select methods of all receivers/
filters/writers and from the stdin and stdout tasks.

14 years agobtr support for the oss writer.
Andre Noll [Tue, 5 Jan 2010 05:09:32 +0000 (06:09 +0100)]
btr support for the oss writer.

14 years agopara_write: Make loglevel work again.
Andre Noll [Tue, 5 Jan 2010 05:06:27 +0000 (06:06 +0100)]
para_write: Make loglevel work again.

Also kill some useless log messagess and fix a memory leak.

14 years agofile writer pre_select() fixes.
Andre Noll [Tue, 5 Jan 2010 05:05:33 +0000 (06:05 +0100)]
file writer pre_select() fixes.

14 years agoalsa: Use new get_btr_* functions.
Andre Noll [Tue, 5 Jan 2010 05:05:11 +0000 (06:05 +0100)]
alsa: Use new get_btr_* functions.

14 years agoAdd get_btr_samplerate() and get_btr_channels().
Andre Noll [Tue, 5 Jan 2010 05:04:04 +0000 (06:04 +0100)]
Add get_btr_samplerate() and get_btr_channels().

These are needed by more than one writer.

14 years agowmadec: Reset converted on each iteration.
Andre Noll [Tue, 5 Jan 2010 02:51:20 +0000 (03:51 +0100)]
wmadec: Reset converted on each iteration.

wmadec does not work at all in btr mode without this fix.

14 years ago[btr] Split btr_del_node() into two functions.
Andre Noll [Tue, 5 Jan 2010 02:50:07 +0000 (03:50 +0100)]
[btr] Split btr_del_node() into two functions.

Also, close filter/receiver nodes in filter.c/recv.c instead of in
each post_select().

14 years agoIntroduce btr_node_status() and add btr support to the file writer.
Andre Noll [Tue, 5 Jan 2010 01:32:21 +0000 (02:32 +0100)]
Introduce btr_node_status() and add btr support to the file writer.

14 years agoAlsa improvement and fixes.
Andre Noll [Mon, 4 Jan 2010 22:11:32 +0000 (23:11 +0100)]
Alsa improvement and fixes.

Wait until pending frames are played.

The old code was buggy because snd_pcm_drain() always fails on a
non-blocking fd. We therefore called snd_pcm_close() while frames
for playback are still availabe, causing the last few frames being
skipped.

14 years agoIntroduce prepare_writer_node().
Andre Noll [Mon, 4 Jan 2010 22:02:42 +0000 (23:02 +0100)]
Introduce prepare_writer_node().

Unused yet.

14 years agoamp filter improvements.
Andre Noll [Mon, 4 Jan 2010 17:37:35 +0000 (18:37 +0100)]
amp filter improvements.

If amp == 0, this filter now splices itself out of the buffer tree.

14 years agostdin: Increase buffer size.
Andre Noll [Mon, 4 Jan 2010 06:28:12 +0000 (07:28 +0100)]
stdin: Increase buffer size.

This seems to make a big difference, the buffer size should definitely
be configurable.

14 years agoAdd btr support for the compress filter.
Andre Noll [Mon, 4 Jan 2010 06:26:56 +0000 (07:26 +0100)]
Add btr support for the compress filter.

14 years agobtr_add_output(): Fix memory leak in case node has no children.
Andre Noll [Sun, 3 Jan 2010 21:45:20 +0000 (22:45 +0100)]
btr_add_output(): Fix memory leak in case node has no children.

14 years agogeneric_filter_pre_select(): Fix off-by-one.
Andre Noll [Sun, 3 Jan 2010 21:44:40 +0000 (22:44 +0100)]
generic_filter_pre_select(): Fix off-by-one.

14 years agoAdd btr support for the amp filter.
Andre Noll [Sun, 3 Jan 2010 21:44:19 +0000 (22:44 +0100)]
Add btr support for the amp filter.

14 years ago[btr:] Add btr_log_tree().
Andre Noll [Sun, 3 Jan 2010 03:12:01 +0000 (04:12 +0100)]
[btr:] Add btr_log_tree().

14 years agoIntroduce and use generic_filter_pre_select().
Andre Noll [Sun, 3 Jan 2010 02:34:53 +0000 (03:34 +0100)]
Introduce and use generic_filter_pre_select().

14 years agoSimplify prepare_filter_node().
Andre Noll [Sun, 3 Jan 2010 02:27:40 +0000 (03:27 +0100)]
Simplify prepare_filter_node().

14 years agoIntroduce filter_node->min_iqs.
Andre Noll [Sun, 3 Jan 2010 02:23:03 +0000 (03:23 +0100)]
Introduce filter_node->min_iqs.

14 years ago[btr:] Rename btr_merge().
Andre Noll [Sun, 3 Jan 2010 02:09:01 +0000 (03:09 +0100)]
[btr:] Rename btr_merge().

14 years agoConsolidate decoder code by introducing prepare_filter_node().
Andre Noll [Sun, 3 Jan 2010 02:00:46 +0000 (03:00 +0100)]
Consolidate decoder code by introducing prepare_filter_node().

14 years agobtr support for the wmadec filter.
Andre Noll [Sat, 2 Jan 2010 23:22:56 +0000 (00:22 +0100)]
btr support for the wmadec filter.

14 years ago[btr]: Add btr_merge_to().
Andre Noll [Sat, 2 Jan 2010 23:22:25 +0000 (00:22 +0100)]
[btr]: Add btr_merge_to().

14 years agoAdd buffer tree support for the aacdec filter.
Andre Noll [Sat, 2 Jan 2010 22:03:54 +0000 (23:03 +0100)]
Add buffer tree support for the aacdec filter.

14 years agowrite_common: Introduce and use setup_writer_node().
Andre Noll [Thu, 31 Dec 2009 18:37:29 +0000 (19:37 +0100)]
write_common: Introduce and use setup_writer_node().

This makes para_write with no options work again.

14 years agoalsa: Kill unnecessary -B option.
Andre Noll [Thu, 31 Dec 2009 18:29:24 +0000 (19:29 +0100)]
alsa: Kill unnecessary -B option.

14 years agowrite.c: Fix cut'n'paste typo.
Andre Noll [Thu, 31 Dec 2009 17:39:25 +0000 (18:39 +0100)]
write.c: Fix cut'n'paste typo.

14 years agoAdd btr support to the oggdec filter.
Andre Noll [Thu, 31 Dec 2009 17:38:33 +0000 (18:38 +0100)]
Add btr support to the oggdec filter.

14 years agobtr: Fix a silly warning.
Andre Noll [Thu, 31 Dec 2009 17:37:41 +0000 (18:37 +0100)]
btr: Fix a silly warning.

14 years agoalsa: Defer asking for samplerate/channels until alsa init time.
Andre Noll [Thu, 31 Dec 2009 17:37:20 +0000 (18:37 +0100)]
alsa: Defer asking for samplerate/channels until alsa init time.

14 years agowrite: Parse command line options also in btr mode.
Andre Noll [Thu, 31 Dec 2009 15:18:35 +0000 (16:18 +0100)]
write: Parse command line options also in btr mode.

14 years agoAdd execute handler to struct writer.
Andre Noll [Thu, 31 Dec 2009 15:18:10 +0000 (16:18 +0100)]
Add execute handler to struct writer.

14 years agoalsa: Close writer in post_select() on errors/eof.
Andre Noll [Thu, 31 Dec 2009 15:13:53 +0000 (16:13 +0100)]
alsa: Close writer in post_select() on errors/eof.

14 years agobtr support for the prebuffer filter.
Andre Noll [Thu, 31 Dec 2009 04:28:00 +0000 (05:28 +0100)]
btr support for the prebuffer filter.

14 years agobtr_slice_out_node() cleanup.
Andre Noll [Thu, 31 Dec 2009 04:27:38 +0000 (05:27 +0100)]
btr_slice_out_node() cleanup.

14 years agoAdd btr support for the wav filter.
Andre Noll [Thu, 31 Dec 2009 03:36:23 +0000 (04:36 +0100)]
Add btr support for the wav filter.

14 years agofilter: Make btr mode understand command line options.
Andre Noll [Thu, 31 Dec 2009 03:35:57 +0000 (04:35 +0100)]
filter: Make btr mode understand command line options.

14 years agostdout: Misc cleanups.
Andre Noll [Thu, 31 Dec 2009 03:35:14 +0000 (04:35 +0100)]
stdout: Misc cleanups.

14 years agomp3dec: Fix EOF condition.
Andre Noll [Thu, 31 Dec 2009 03:34:50 +0000 (04:34 +0100)]
mp3dec: Fix EOF condition.

14 years agobuffer tree: Fix btr_splice_out_node().
Andre Noll [Thu, 31 Dec 2009 03:33:58 +0000 (04:33 +0100)]
buffer tree: Fix btr_splice_out_node().

14 years agoAdd execute support to mp3dec filter.
Andre Noll [Thu, 31 Dec 2009 01:16:25 +0000 (02:16 +0100)]
Add execute support to mp3dec filter.

14 years agoAdd btr support to filter code.
Andre Noll [Thu, 31 Dec 2009 01:04:01 +0000 (02:04 +0100)]
Add btr support to filter code.

A bit rough and only the mp3dec filter kind of works. Execute support
for mp3dec is also missing.

14 years agoFirst preparations for btr support in para_filter.
Andre Noll [Wed, 30 Dec 2009 00:38:26 +0000 (01:38 +0100)]
First preparations for btr support in para_filter.

14 years agopara_write: Make check for wav header work with btr.
Andre Noll [Tue, 29 Dec 2009 23:51:21 +0000 (00:51 +0100)]
para_write: Make check for wav header work with btr.

14 years agobuffer_tree: Add code to splice out a node of the buffer tree.
Andre Noll [Tue, 29 Dec 2009 21:53:07 +0000 (22:53 +0100)]
buffer_tree: Add code to splice out a node of the buffer tree.

14 years ago[btr]: Minor improvements and cleanups.
Andre Noll [Tue, 29 Dec 2009 21:51:29 +0000 (22:51 +0100)]
[btr]: Minor improvements and cleanups.

14 years agowrite/alsa: Add btr support.
Andre Noll [Tue, 29 Dec 2009 20:17:18 +0000 (21:17 +0100)]
write/alsa: Add btr support.

Not yet finished.

Supporting btr required some changes in the buffer tree code
as well.

14 years agowrite: Add --buffer-tree option.
Andre Noll [Tue, 29 Dec 2009 00:30:44 +0000 (01:30 +0100)]
write: Add --buffer-tree option.

Not yet used.

14 years agostdin.c: btr preparations.
Andre Noll [Tue, 29 Dec 2009 00:26:24 +0000 (01:26 +0100)]
stdin.c: btr preparations.

14 years agostdin: Fix a signed bug.
Andre Noll [Tue, 29 Dec 2009 00:14:50 +0000 (01:14 +0100)]
stdin: Fix a signed bug.

We have to return a negative error code.

14 years agobtr: Make it kind of work for http recv + stdout.
Andre Noll [Mon, 28 Dec 2009 23:42:47 +0000 (00:42 +0100)]
btr: Make it kind of work for http recv + stdout.