]> git.tue.mpg.de Git - paraslash.git/log
paraslash.git
15 years agoMerge commit 'fml/master' into next
Andre Noll [Fri, 10 Jul 2009 07:46:32 +0000 (09:46 +0200)]
Merge commit 'fml/master' into next

15 years agoAdd the new "year" mood method.
Andre Noll [Thu, 9 Jul 2009 18:11:55 +0000 (20:11 +0200)]
Add the new "year" mood method.

This includes a Y2K heuristic for year tags that contain only two digits. If that two-digit
number N is less or equal than the current year minus 2000, assume that it means 2000 + N.
Otherwise, assume 1900 + N.

Examples: 0 -> 2000, 42 -> 1942, 9->2009.

15 years agoAdd missing regex include to generated command_list files.
Andre Noll [Thu, 9 Jul 2009 18:04:29 +0000 (20:04 +0200)]
Add missing regex include to generated command_list files.

15 years agoIntroduce para_regcomp.
Andre Noll [Wed, 8 Jul 2009 21:10:49 +0000 (23:10 +0200)]
Introduce para_regcomp.

A wrapper for regcomp() that logs an error message if the regcomp() failed
and uses a return value according to the paraslash rules. Currently there is
only one user of regular expressions, is_v4_dot_quad(), which is converted
to para_regex(), but new callers will be added soon.

Unfortunately, this change made it necessary to include regex.h in all .c files
that use string.h. Clean up the order in which headers are included a bit while
we're at it.

Maybe I should rethink the rule "Only .c files shall include header files"...

15 years agoPass full argument list to mood parsers.
Andre Noll [Wed, 8 Jul 2009 19:59:39 +0000 (21:59 +0200)]
Pass full argument list to mood parsers.

Currently, for each mood line only the first word after the mood method  is passed
to the mood parser. Passing all arguments allows for mood parsers that take more
than one argument.l

15 years agofade.c: Fix a gcc warning on FreeBSD.
Andre Noll [Tue, 7 Jul 2009 13:53:59 +0000 (15:53 +0200)]
fade.c: Fix a gcc warning on FreeBSD.

fade.c:220: warning: long unsigned int format, time_t arg (arg 4)

15 years agorecv/filter: Init loglevel earlier.
Andre Noll [Sun, 5 Jul 2009 21:26:54 +0000 (23:26 +0200)]
recv/filter: Init loglevel earlier.

This avoids that early debug messages are always printed.

15 years agofd.c: Simplify write_ok().
Andre Noll [Sun, 5 Jul 2009 20:40:12 +0000 (22:40 +0200)]
fd.c: Simplify write_ok().

Use para_select() rather than open-code it.

15 years agofd.c: Simplify para_select().
Andre Noll [Sun, 5 Jul 2009 20:39:36 +0000 (22:39 +0200)]
fd.c: Simplify para_select().

No need  to save errno into an extra variable.

15 years agocom_stat(): Return a proper error message if an invalid option was given.
Andre Noll [Sun, 5 Jul 2009 20:38:22 +0000 (22:38 +0200)]
com_stat(): Return a proper error message if an invalid option was given.

15 years agoRewrite grab-client code.
Andre Noll [Sun, 5 Jul 2009 20:35:29 +0000 (22:35 +0200)]
Rewrite grab-client code.

This gets rid of the gengetopt grab client command line parser and all the special
treatment it caused.

15 years agoReplace split_args() by create_argv().
Andre Noll [Sun, 5 Jul 2009 16:11:32 +0000 (18:11 +0200)]
Replace split_args() by create_argv().

The latter function is superior as it honors quotes and special characters like '\n'.
This allows for example to use whitespace characters in mood methods.
Fixup and simplify all callers accordingly.

The patch broke the grab command of para_audiod which is deactivated ATM and
will be fixed in a subsequent patch.

15 years agoMerge branch 'master' into next
Andre Noll [Sun, 5 Jul 2009 08:56:17 +0000 (10:56 +0200)]
Merge branch 'master' into next

15 years agoFix a bug in the output of para_audioc.
Andre Noll [Sun, 5 Jul 2009 08:40:55 +0000 (10:40 +0200)]
Fix a bug in the output of para_audioc.

This bites In case of short writes to stdout. The bug was literally there since day one
but never showed up as short writes usually don't happen with the rather small amount
of data that is written by para_audioc.

15 years agogui: Avoid unnecessary strdup's and replace newlines by spaces in curses output.
Andre Noll [Sun, 5 Jul 2009 08:53:06 +0000 (10:53 +0200)]
gui: Avoid unnecessary strdup's and replace newlines by spaces in curses output.

align_str() made a copy of the given buffer because one of its callers, print_in_bar(),
passes a string literal and align_str() needs to truncate large strings.However, all other
callers pass a writable string anyway, so do the strdup() in print_in_bar(). This avoids the
unnecessary copies for each status item.

The areas for the status items was designed to hold only a part of a single line, so status
item text should not contain newlines. The patch replaces newlines by spaces.

Also get rid of a stale comment.

15 years agogui: Use variable-sized input buffer for the audiod pipe.
Andre Noll [Sun, 5 Jul 2009 08:44:23 +0000 (10:44 +0200)]
gui: Use variable-sized input buffer for the audiod pipe.

The previous fixed size of 8192 might be too small if the audio file contains large
tags. OTOH, 8192 is much too large for the bulk of all audio files. So use a small
buffer that gets increased on demand.

15 years agoFix a bug in the output of para_audioc.
Andre Noll [Sun, 5 Jul 2009 08:40:55 +0000 (10:40 +0200)]
Fix a bug in the output of para_audioc.

This bites In case of short writes to stdout. The bug was literally there since day one
but never showed up as short writes usually don't happen with the rather small amount
of data that is written by para_audioc.

15 years agoNew codename for 0.4.
Andre Noll [Sun, 5 Jul 2009 08:38:20 +0000 (10:38 +0200)]
New codename for 0.4.

15 years agoDocumentation updates for 0.4.
Andre Noll [Sun, 5 Jul 2009 08:38:01 +0000 (10:38 +0200)]
Documentation updates for 0.4.

15 years agoMerge branch 'master' into next
Andre Noll [Sat, 4 Jul 2009 21:23:00 +0000 (23:23 +0200)]
Merge branch 'master' into next

15 years agoINSTALL: Fix the help text on how to create the RSA key pair.
Andre Noll [Sat, 4 Jul 2009 21:21:56 +0000 (23:21 +0200)]
INSTALL: Fix the help text on how to create the RSA key pair.

Some day, I will write a user-friendly script that generates the keys...

15 years agoAdd a check for libosl to configure.ac.
Andre Noll [Sat, 4 Jul 2009 19:45:48 +0000 (21:45 +0200)]
Add a check for libosl to configure.ac.

If libosl is not found, configure will exit with an error message describing how
to download and install libosl. We could make it optional and build only the
client side of paraslash if libosl is not available, but that seems not be worth the
trouble as everyone likely wants to build para_server anyway.

15 years agoMakefile: Remove *_command_list.* on make clean.
Andre Noll [Sat, 4 Jul 2009 19:13:23 +0000 (21:13 +0200)]
Makefile: Remove *_command_list.* on make clean.

No need to do this only for maintainer-clean.

15 years agocommand_util: Generate properly documented command header files.
Andre Noll [Sat, 4 Jul 2009 19:12:22 +0000 (21:12 +0200)]
command_util: Generate properly documented command header files.

15 years agopara_server: Don't link with stat.o.
Andre Noll [Sat, 4 Jul 2009 17:23:00 +0000 (19:23 +0200)]
para_server: Don't link with stat.o.

We linked stat.o only because command.o needs the status item array.
Definining this array in command.c allows to link para_server without
stat.o.

15 years agoChange the syntax of the parameters to the touch command.
Andre Noll [Sat, 4 Jul 2009 16:29:31 +0000 (18:29 +0200)]
Change the syntax of the parameters to the touch command.

It's more natural to specify e.g. the numplayed count as

touch -n=42

rather than

touch -n42

15 years agoFix some gcc warnings.
Andre Noll [Sat, 4 Jul 2009 16:19:46 +0000 (18:19 +0200)]
Fix some gcc warnings.

Moving the declaration of send_afs_status() which depends on
struct rc4_context out of afs.h fixes a couple of these:

afs.h:120: warning: 'struct rc4_context' declared inside parameter list

15 years agoMerge branch 'afh_cleanup' into next.
Andre Noll [Sat, 4 Jul 2009 15:15:50 +0000 (17:15 +0200)]
Merge branch 'afh_cleanup' into next.

Quite a few conflicts, but no real problem. git rerere rulez!

Conflicts:
afs.c
afs.cmd
aft.c
attribute.c
audiod_command.c
blob.c
command.c
para.h
server.c
server.cmd
stat.c

15 years agoMerge branch 'crypt' into next
Andre Noll [Sat, 4 Jul 2009 14:25:20 +0000 (16:25 +0200)]
Merge branch 'crypt' into next

15 years agoNEWS update.
Andre Noll [Sat, 4 Jul 2009 14:24:25 +0000 (16:24 +0200)]
NEWS update.

15 years agoaudioc stat: Remove __a_unused attributes from com_stat().
Andre Noll [Sat, 4 Jul 2009 14:22:44 +0000 (16:22 +0200)]
audioc stat: Remove __a_unused attributes from com_stat().

argc and argv _are_ used.

15 years agoaudioc stat: Make status item mask 64 bits wide.
Andre Noll [Sat, 4 Jul 2009 14:21:36 +0000 (16:21 +0200)]
audioc stat: Make status item mask 64 bits wide.

We already have more than 32 status items.

15 years agoMerge commit 'fml/master'
Andre Noll [Sat, 4 Jul 2009 13:53:43 +0000 (15:53 +0200)]
Merge commit 'fml/master'

15 years agoRevamp status item handling.
Andre Noll [Sat, 4 Jul 2009 13:52:39 +0000 (15:52 +0200)]
Revamp status item handling.

This patch changes the way the status items are printed and parsed.
The new parser-friendly format is used internally and, as a side
effect, is also available as an new listing mode for the ls command
and for the stat commands of both para_server and para_audiod.

With the new format, each status item is prefixed by its size, and the
status item identifier is printed as a numerical value. This simplifies
the parsing code in para_audiod/para_gui a bit and should make it
perform better as the status items do not have to be looked up by name.

More importantly, the new format  gets rid of the restriction that
status items should not contain newline characters because the parser
knows in advance how much it has to read to get the complete item. This
restriction became a real problem as more and more audio files contain
(version 2 id3) tags that contain much more than a single line. For
example the linux podcast mp3 files contain the full content of the
podcast as text in the command tag.

15 years agomake_attribute_lines(): Check return value of ().
Andre Noll [Tue, 30 Jun 2009 18:19:27 +0000 (20:19 +0200)]
make_attribute_lines(): Check return value of ().

As get_attribute_text() might fail, we have to check its return value.

15 years agoSupport netmask subsets
Gerrit Renker [Tue, 30 Jun 2009 08:20:19 +0000 (10:20 +0200)]
Support netmask subsets

This allows to specify sets of addresses which are defined by sharing
the least-common netmask value.

For example, if the allow list contains the following addresses:

        10.0.0.2/24  10.0.0.2/32

then the second address is redundant since it is already included
via the first one. The least-common netmask value is 24; with this
patch a command like

        para_client sender http deny 10.0.0.0/24

will catch both addresses.

15 years agoMake allow/deny syntax consistent with that of add/delete
Gerrit Renker [Tue, 30 Jun 2009 08:17:16 +0000 (10:17 +0200)]
Make allow/deny syntax consistent with that of add/delete

After the changes for the add/delete commands, this patch updates
allow/deny to use the same syntax and (almost) the same code.

15 years agoObtain afs status items directly from afs.
Andre Noll [Mon, 29 Jun 2009 17:34:24 +0000 (19:34 +0200)]
Obtain afs status items directly from afs.

This patch changes the way how the afs status items are passed from afs to the stat
command handler. Previously, afs passed the status item string to the server process
whenever a new audio file was loaded. The server process stored the string in the mmd
shared memory area from which it was available to the client process that executed the
stat command.

This approach has the disadvantage that  the size of the string must be restricted to a
fixed number of bytes,  VERBOSE_LS_OUTPUT_SIZE, determined at compile time and
independent of the audio file.  As version 2 id3 tags and vorbis comments do not impose
an upper bound on the size of the tags a rather ugly patch was merged recently to the master
branch which truncated the size of the tags if it exceeded VERBOSE_LS_OUTPUT_SIZE.

This patch gets rid of this restriction by not storing the info string in the mmd structure. Instead,
the stat command requests the information directly from the afs process via the callback
mechanism which is also used by other afs commands.

15 years agoMajor audio format handler cleanups.
Andre Noll [Fri, 26 Jun 2009 18:54:55 +0000 (20:54 +0200)]
Major audio format handler cleanups.

The main change is the replacement of afhi->taginfo by more specific
fields: This patch adds struct taginfo to the audio format handler
info struct.

The prefix is no longer stored inside the osl database, i.e. it is
no longer duplicated for each audio file.

The tag information is only stored in memory as a dynamically allocated
string if it is new, i.e. if the struct was generated by the audio format
handler. If it was retrieved from the database, pointers to the memory
mapped table are used instead.

The crappy fixup_info_string() function is gone. It was too ugly to live.
Of course, this re-introduces the bug it fixed, but as we broke the
on disk format with this patch anyway, we might as well fix it right(TM).
This will be done in a subsequent patch.

afhi->eof_tv is gone as well. It was not useful at all.

15 years agoStronger crypto for client authentication.
Andre Noll [Sun, 21 Jun 2009 18:55:07 +0000 (20:55 +0200)]
Stronger crypto for client authentication.

This patch changes the way clients are authenticated:

- The size of the challenge has been increased from sizeof(unsigned long)
to 64. Openssl's Rand_bytes() is used to get the random buffer for the
challenge and the rc4 keys.

- The client responds with the sha1 hash of the challenge rather than
sending back the decrypted challenge in plain text.

- The rc4 keys are now 2 x 32 bytes long. They are rsa encrypted and
sent together with the challenge.

- Authentication requests for invalid users are not immediatedly denied
as this would reveal the fact that the user does not exist.

- rsa keys are required to be at least 2048 bits long.

15 years agoUpdate to gengetopt 2.22.2.
Andre Noll [Sun, 21 Jun 2009 10:12:28 +0000 (12:12 +0200)]
Update to gengetopt 2.22.2.

This introduced a new gcc warning which is fixed by this patch.

15 years agoMake rc4 encryption/decryption more explicit.
Andre Noll [Sun, 14 Jun 2009 20:50:11 +0000 (22:50 +0200)]
Make rc4 encryption/decryption more explicit.

The old code used a rather fancy way to (de)activate encryption on
a per fd basis: In net.c there was an array of rc4 keys, indexed by fd.
This is rather wastful because the array size is determined by the
highest fd for which encryption is activated.

It's also hard to comprehend and it's easy to get strange results if
one forgets to deactivate the encryption after the fd is closed.

This patch introduces a new structure, rc4_context, which consists of
an fd and the needed rc4 keys. Users explicitly call the new rc4 variants
of the receving/sending functions which take a pointer to a struct
rc4_context instead of a file descriptor but are otherwise identical.

Keep crypt simple!

15 years agoMove para_tmpname() to file_write.c and make it static.
Andre Noll [Sun, 14 Jun 2009 10:30:41 +0000 (12:30 +0200)]
Move para_tmpname() to file_write.c and make it static.

Also use para_random() instead of rand().

15 years agoUse openssl's RAND_load_file() and RAND_bytes() to get randomness.
Andre Noll [Sun, 14 Jun 2009 09:02:17 +0000 (11:02 +0200)]
Use openssl's RAND_load_file() and RAND_bytes() to get randomness.

This should yield random data that is cryptographically stronger than
random().

15 years agoKill the client-0.2.6 compatibility mode and the --plain option.
Andre Noll [Sat, 13 Jun 2009 18:41:59 +0000 (20:41 +0200)]
Kill the client-0.2.6 compatibility mode and the --plain option.

This makes rc4 encryption mandatory.

15 years agoDeactivate gcc's strict aliasing optimizations.
Andre Noll [Sat, 13 Jun 2009 17:22:51 +0000 (19:22 +0200)]
Deactivate gcc's strict aliasing optimizations.

This causes a lot of warnings which are not easy to fix and probably
harmless. So simply disallow gcc to assume the strictest aliasing
rules.

15 years agoReplace the convert_0.2-0.3.sh script by convert_0.3-0.4.sh.
Andre Noll [Sat, 13 Jun 2009 17:17:21 +0000 (19:17 +0200)]
Replace the convert_0.2-0.3.sh script by convert_0.3-0.4.sh.

15 years agoAdd new ls option -d.
Andre Noll [Sat, 13 Jun 2009 11:53:42 +0000 (13:53 +0200)]
Add new ls option -d.

This is useful for the conversion script that transforms the afs
database to the 0.4 format.

15 years agoFix osl() wrapper.
Andre Noll [Fri, 12 Jun 2009 19:39:52 +0000 (21:39 +0200)]
Fix osl() wrapper.

15 years agoFix checking of return values from osl_open().
Andre Noll [Fri, 12 Jun 2009 19:39:38 +0000 (21:39 +0200)]
Fix checking of return values from osl_open().

15 years agoUse different paths for the 0.4 database and the afs socket.
Andre Noll [Fri, 12 Jun 2009 19:38:07 +0000 (21:38 +0200)]
Use different paths for the 0.4 database and the afs socket.

15 years agoAdd osl.h include to generated command C files.
Andre Noll [Thu, 11 Jun 2009 23:13:33 +0000 (01:13 +0200)]
Add osl.h include to generated command C files.

15 years agoFix para_strerror() and use osl() wrapper for osl library calls.
Andre Noll [Thu, 11 Jun 2009 22:35:15 +0000 (00:35 +0200)]
Fix para_strerror() and use osl() wrapper for osl library calls.

15 years agoFirst draft of the libosl patch series.
Andre Noll [Mon, 18 May 2009 07:42:14 +0000 (09:42 +0200)]
First draft of the libosl patch series.

15 years agoMerge commit 'fml/master'
Andre Noll [Sat, 6 Jun 2009 13:48:34 +0000 (15:48 +0200)]
Merge commit 'fml/master'

15 years agoTrivial typo fixes and cosmetic cleanups.
Andre Noll [Thu, 4 Jun 2009 22:43:28 +0000 (00:43 +0200)]
Trivial typo fixes and cosmetic cleanups.

15 years agoFix a typo in the audiod man page.
Andre Noll [Wed, 3 Jun 2009 08:44:23 +0000 (10:44 +0200)]
Fix a typo in the audiod man page.

Thanks to Gerrit Renker who pointed out the typo.

15 years agoMerge commit 'fml/master'
Andre Noll [Sun, 31 May 2009 10:40:10 +0000 (12:40 +0200)]
Merge commit 'fml/master'

15 years agoalsa_write: Avoid EAGAIN.
Andre Noll [Sun, 31 May 2009 10:34:39 +0000 (12:34 +0200)]
alsa_write: Avoid EAGAIN.

Before writing to the sound device, use snd_pcm_avail_update() to
check how many frames alsa will accept and write only that many
frames.

15 years agoMerge commit 'meins/master'
Andre Noll [Thu, 28 May 2009 09:19:25 +0000 (11:19 +0200)]
Merge commit 'meins/master'

15 years agoTruncate overlong tag info and replace newlines by spaces.
Andre Noll [Wed, 27 May 2009 17:16:54 +0000 (19:16 +0200)]
Truncate overlong tag info and replace newlines by spaces.

The tag info which is computed by the audio format handlers and stored
in the audio file table is read into a fixed-size buffer by the audio
file selector in open_and_update_audio_file(), passed to the server
process and then sent to the client via the stat command. It is not
interpreted at all during this process. In particular, it is not
essential for correctly streaming the audio file.

Vorbis comments and id3v2 tags have no size limit and may contain
arbitrary data which may lead to the following twi problems:

- As noted by Gerrit Renker, if the tag info is too long
to fit into the fixed-size buffer, the current code skips
the audio file and removes it from the list of currently
admissible files. So para_server fails to stream such files.

- If the tag info contains newlines, these are included
verbatim in the status output which may confuse para_audiod.

This patch truncates the tag info string if it does not fit into the
4K buffer and replaces newlines by spaces. This is a bit ugly but
avoids both of the above problems. It's still possible to retrieve
the complete tag info via the "ls -lv" command.

15 years agoaft: Reorganize make_status_items().
Andre Noll [Tue, 26 May 2009 20:20:50 +0000 (22:20 +0200)]
aft: Reorganize make_status_items().

It's cleaner to allocate the struct ls_data within make_status_items().

15 years agoFix build on MacOs.
Andre Noll [Tue, 26 May 2009 18:51:48 +0000 (20:51 +0200)]
Fix build on MacOs.

The changes to write.h broke the osx writer. The fix is trivial though.

15 years agoaft: Make make_status_items() static.
Andre Noll [Mon, 25 May 2009 21:02:50 +0000 (23:02 +0200)]
aft: Make make_status_items() static.

Move its single caller, open_and_update_audio_file(), below
make_status_items and get rid of the declaration in afs.h.

15 years agoKill some semicolons outside function definitions.
Andre Noll [Sun, 17 May 2009 18:14:26 +0000 (20:14 +0200)]
Kill some semicolons outside function definitions.

15 years agostruct writer_node: Store the number of the writer rather than a pointer.
Andre Noll [Thu, 14 May 2009 06:34:06 +0000 (08:34 +0200)]
struct writer_node: Store the number of the writer rather than a pointer.

This makes it easier to get the name of the writer from the writer_node
struct.

15 years agoFix a gcc warning on x86_64.
Andre Noll [Mon, 11 May 2009 07:47:31 +0000 (09:47 +0200)]
Fix a gcc warning on x86_64.

15 years agoFix a copy-and-paste typo in the udp sender.
Andre Noll [Sun, 10 May 2009 20:55:56 +0000 (22:55 +0200)]
Fix a copy-and-paste typo in the udp sender.

15 years agoFix the --log_color option of para_server and para_audiod.
Andre Noll [Sun, 10 May 2009 20:55:20 +0000 (22:55 +0200)]
Fix the --log_color option of para_server and para_audiod.

15 years agorbtree: Add const qualifier to some functions.
Andre Noll [Sun, 10 May 2009 19:31:13 +0000 (21:31 +0200)]
rbtree: Add const qualifier to some functions.

The 'rb_first()', 'rb_last()', 'rb_next()' and 'rb_prev()' calls take a pointer
to an RB node or RB root. They do not change the pointed objects, so add a
'const' qualifier.

See commit f4b477c47332367d35686bd2b808c2156b96d7c7 in the linux source tree.

15 years agoAdd some missing source code documentation.
Andre Noll [Sun, 10 May 2009 18:41:11 +0000 (20:41 +0200)]
Add some missing source code documentation.

15 years agoAdd ggo/.gitignore to hide derived ggo files.
Andre Noll [Sun, 10 May 2009 16:11:30 +0000 (18:11 +0200)]
Add ggo/.gitignore to hide derived ggo files.

15 years agoAdd new prebuffer filter.
Andre Noll [Sun, 10 May 2009 15:46:40 +0000 (17:46 +0200)]
Add new prebuffer filter.

This could be handy for lossy networks that require a lot of buffering
in addition to methods (like FEC) to cope with packet loss.

15 years agofilter: Force a minimal select timeout if something was converted.
Andre Noll [Sun, 10 May 2009 15:40:42 +0000 (17:40 +0200)]
filter: Force a minimal select timeout if something was converted.

When filter_preselect() runs. other pre_select functions might have
already been called and decided to do nothing, e.g. because their
output buffer was full or the input buffer was empty.

If this call to filter_preselect() changed any of the involved buffers,
we want those other pre_select() functions to be called ASAP. So force
a minimal timeout for the next select call to avoid unnecessary delays.

15 years agomp3dec: Try harder to recover from non-fatal errors.
Andre Noll [Sun, 10 May 2009 13:28:13 +0000 (15:28 +0200)]
mp3dec: Try harder to recover from non-fatal errors.

If there's still data left, try to decode the next header in the
same scheduler run. This avoids unnecessary copies of large parts
of the mp3 input buffer.

15 years agoaudiod: Properly handle wng open failures.
Andre Noll [Sun, 10 May 2009 12:11:38 +0000 (14:11 +0200)]
audiod: Properly handle wng open failures.

If opening the writer node group fails, no task is being registered to the
scheduler although a task structure is allocated. This makes audiod think
everything is fine until the output buffer of the receiver or a filter is
filled up which may take several seconds.

Fix this flaw by setting the error field of the wng to -E_TASK_UNREGISTERED.
This causes audiod to close the receiver node and the filter chain and to
clear the affected slot.

15 years agoFirst draft of the oss writer.
Andre Noll [Sat, 9 May 2009 08:59:14 +0000 (10:59 +0200)]
First draft of the oss writer.

This adds client-side support for FreeBSD and NetBSD and provides an
alternative writer for Linux.

15 years agoAllow writers that have no pre_select functions.
Andre Noll [Fri, 8 May 2009 19:49:30 +0000 (21:49 +0200)]
Allow writers that have no pre_select functions.

Also, fix the pointer being printed in a debug message of the scheduler.

15 years agoNEWS update.
Andre Noll [Fri, 8 May 2009 08:04:11 +0000 (10:04 +0200)]
NEWS update.

15 years agoMerge branch 'next'
Andre Noll [Thu, 7 May 2009 17:03:49 +0000 (19:03 +0200)]
Merge branch 'next'

15 years agonew codename, reset version to git
Andre Noll [Thu, 7 May 2009 15:46:15 +0000 (17:46 +0200)]
new codename, reset version to git

15 years agothe paraslash-0.3.4 release tarball
Andre Noll [Thu, 7 May 2009 15:38:49 +0000 (17:38 +0200)]
the paraslash-0.3.4 release tarball

15 years agoparaslash 0.3.4 v0.3.4
Andre Noll [Thu, 7 May 2009 15:35:34 +0000 (17:35 +0200)]
paraslash 0.3.4

15 years agoRemove an overambitious sanity check in the fecdec filter.
Andre Noll [Thu, 7 May 2009 14:44:57 +0000 (16:44 +0200)]
Remove an overambitious sanity check in the fecdec filter.

15 years agoKill a bashism in configure.ac.
Andre Noll [Mon, 4 May 2009 14:23:04 +0000 (16:23 +0200)]
Kill a bashism in configure.ac.

This caused additional quotes when /bin/sh is dash or tcsh which would result
in syntax errors during compilation.

15 years agoFix compilation on FreeBSD.
Andre Noll [Mon, 4 May 2009 11:34:16 +0000 (13:34 +0200)]
Fix compilation on FreeBSD.

Without these two includes, compilation fails on FreeBSD with

/usr/include/net/if.h:265: error: field `ifru_addr' has incomplete type
/usr/include/net/if.h:266: error: field `ifru_dstaddr' has incomplete type
/usr/include/net/if.h:267: error: field `ifru_broadaddr' has incomplete type
/usr/include/net/if.h:299: error: field `ifra_addr' has incomplete type
/usr/include/net/if.h:300: error: field `ifra_broadaddr' has incomplete type
/usr/include/net/if.h:301: error: field `ifra_mask' has incomplete type
/usr/include/net/if.h:368: error: field `addr' has incomplete type
/usr/include/net/if.h:369: error: field `dstaddr' has incomplete type

15 years agoFix two gcc warnings.
Andre Noll [Mon, 4 May 2009 11:12:17 +0000 (13:12 +0200)]
Fix two gcc warnings.

mp3_afh.c:420: warning: comparison of distinct pointer types lacks a cast
alsa_write.c:119: warning: format '%zu' expects type 'size_t', but argument 4 has type 'int'

15 years agoMerge branch 'master' into next
Andre Noll [Sun, 3 May 2009 17:09:16 +0000 (19:09 +0200)]
Merge branch 'master' into next

15 years agoAlsa fixes and cleanups.
Andre Noll [Sun, 3 May 2009 16:11:22 +0000 (18:11 +0200)]
Alsa fixes and cleanups.

This patch

- replaces the unused E_SND_PCM_INFO error by E_PHYSICAL_WIDTH,

- checks the return value of snd_pcm_format_physical_width() and returns
  -E_PHYSICAL_WIDTH if this causes bytes_per_frame being non-positive,

- introduces an upper bound for the start threshold. Without that
  change, playback could be delayed by several seconds on some alsa
  configurations (problem pointed out by Johannes Wörner, thanks).

- does not return early on input errors which could cause the last
  part of the audio stream being skipped.

- avoids calling snd_pcm_writei() with a frame count of zero which
  could happen with the old code in case there's more than zero but
  less than a full frame of audio data available.

- cleans up the documentation of struct private_alsa_write_data

15 years agoRe-revert "Auto-adjust fecdec output buffer size."
Andre Noll [Sat, 2 May 2009 10:53:54 +0000 (12:53 +0200)]
Re-revert "Auto-adjust fecdec output buffer size."

This re-applies commit 35f9051506345255c7ed3c076b7df5f3b7d26039 which
should work due to the previous output buffer patch.

15 years agoMerge branch 'master' into next
Andre Noll [Sat, 2 May 2009 09:50:17 +0000 (11:50 +0200)]
Merge branch 'master' into next

15 years agoUse only a single buffer pointer for filters/receivers.
Andre Noll [Sat, 2 May 2009 09:46:46 +0000 (11:46 +0200)]
Use only a single buffer pointer for filters/receivers.

This allows filters to change the output buffer size on the fly.

15 years agofecdec: Add another sanity check to find_group().
Andre Noll [Fri, 1 May 2009 20:07:49 +0000 (22:07 +0200)]
fecdec: Add another sanity check to find_group().

15 years agoalsa: Do not call alsa shutdown functions if alsa wasn't yet initialized.
Andre Noll [Fri, 1 May 2009 12:05:47 +0000 (14:05 +0200)]
alsa: Do not call alsa shutdown functions if alsa wasn't yet initialized.

This might happen if the wng is destroyed before any output was
produced. This bug could trigger

para_audiod: pcm.c:1105: snd_pcm_drain: Assertion `pcm' failed

causing audiod to crash.

15 years agoalsa: Fix a typo in comment.
Andre Noll [Fri, 1 May 2009 11:51:33 +0000 (13:51 +0200)]
alsa: Fix a typo in comment.

15 years agofecdec: Be more anal when finding fec groups.
Andre Noll [Fri, 1 May 2009 11:42:21 +0000 (13:42 +0200)]
fecdec: Be more anal when finding fec groups.

If the number of (data) slices changes, there's something seriously
wrong. So return an error if we detect this situation.

15 years agofecdec: Fix warning message when freeing incomplete groups.
Andre Noll [Fri, 1 May 2009 11:35:54 +0000 (13:35 +0200)]
fecdec: Fix warning message when freeing incomplete groups.

This could lead to a segfault.

15 years ago[client] Dynamically allocate output buffer.
Andre Noll [Wed, 29 Apr 2009 19:26:00 +0000 (21:26 +0200)]
[client] Dynamically allocate output buffer.

This should simplify subsequent patches that allow variable-sized
output buffers for filters/receivers.

15 years agoMerge branch 'master' into next
Andre Noll [Mon, 27 Apr 2009 18:26:34 +0000 (20:26 +0200)]
Merge branch 'master' into next

15 years agoRevert "Auto-adjust fecdec output buffer size."
Andre Noll [Sun, 26 Apr 2009 20:35:53 +0000 (22:35 +0200)]
Revert "Auto-adjust fecdec output buffer size."

This reverts commit 35f9051506345255c7ed3c076b7df5f3b7d26039.

Currently, filters must not change their output buffer on the fly
because the writer might already have a reference to the old buffer
and keeps using this buffer.

As dealing with changing output buffers requires much more work,
including changes to the generic filter and writer code, let's defer
this change to post 0.3.4.