paraslash.git
14 years agowma: Remove an unused variable.
Andre Noll [Mon, 12 Oct 2009 18:37:01 +0000 (20:37 +0200)]
wma: Remove an unused variable.

14 years agowma afh chunk time fixes
Andre Noll [Sat, 10 Oct 2009 12:42:51 +0000 (14:42 +0200)]
wma afh chunk time fixes

14 years agowma: Fix chunk_table computation.
Andre Noll [Fri, 9 Oct 2009 14:02:51 +0000 (16:02 +0200)]
wma: Fix chunk_table computation.

14 years agoMore misc wma fixes.
Andre Noll [Wed, 7 Oct 2009 23:09:52 +0000 (01:09 +0200)]
More misc wma fixes.

14 years agoRename mdcdt.c and mdcdt.h.
Andre Noll [Wed, 7 Oct 2009 21:25:27 +0000 (23:25 +0200)]
Rename mdcdt.c and mdcdt.h.

libvorbis also has an mdct_init(), but our own one gets used. This
makes the oggdec filter behave real funny.

This patch makes the oggdec filter work again.

14 years agoVarious wma fixes.
Andre Noll [Wed, 7 Oct 2009 18:53:47 +0000 (20:53 +0200)]
Various wma fixes.

14 years agoAdd a few more people to CREDITS.
Andre Noll [Tue, 6 Oct 2009 21:33:27 +0000 (23:33 +0200)]
Add a few more people to CREDITS.

14 years agoSet channels and samplerate of the filter chain
Andre Noll [Tue, 6 Oct 2009 21:25:23 +0000 (23:25 +0200)]
Set channels and samplerate of the filter chain

14 years agoFirst draft of the wma decoder.
Andre Noll [Tue, 6 Oct 2009 21:03:11 +0000 (23:03 +0200)]
First draft of the wma decoder.

Understands only v1, but is easy to crash.

14 years agoMerge branch 'master' into next
Andre Noll [Wed, 18 Nov 2009 18:28:28 +0000 (19:28 +0100)]
Merge branch 'master' into next

14 years agoMerge branch 'maint'
Andre Noll [Wed, 18 Nov 2009 18:24:28 +0000 (19:24 +0100)]
Merge branch 'maint'

14 years agofecdec: Defer decoding until the next group after the first _usable_ fec group starts.
Andre Noll [Wed, 18 Nov 2009 18:23:45 +0000 (19:23 +0100)]
fecdec: Defer decoding until the next group after the first _usable_ fec group starts.

Commit faeabd31b4bea5c097acff4738a0626e3c84f1d9 (fecdec: Defer decoding until
the first slice of the second group arrives.) changed the fec decoder such that it does
not start to write the decoded output ASAP but waits until the next group starts.

This is generally a good idea, but the patch missed the fact that the first complete group
might be unusable in case of streams that carry an audio file header (currently only ogg
vorbis).

Fix this flaw by setting the completion status to GCS_FIRST_GROUP_COMPLETE only
if we received a complete group that is also usable.

14 years agoMerge branch 'master' into next
Andre Noll [Thu, 12 Nov 2009 23:48:33 +0000 (00:48 +0100)]
Merge branch 'master' into next

14 years agoMerge branch 'maint'
Andre Noll [Thu, 12 Nov 2009 23:48:19 +0000 (00:48 +0100)]
Merge branch 'maint'

14 years agohttp/dccp: Do not send the audio file header twice.
Andre Noll [Thu, 12 Nov 2009 23:39:22 +0000 (00:39 +0100)]
http/dccp: Do not send the audio file header twice.

If the http/dccp client connects before stream start and the stream
starts at the beginning of the audio file (the common case), we do not
need to send the audio file header as it is contained in chunk zero.

However, the current code fails to set sender_client->sent_header to
a non-zero value in this case. This causes the header to be sent twice.

The ogg vorbis decoder is quite forgiving in that respect, which is
probably why this bug went unnoticed for so long. This patch gets
it right.

14 years agoMerge branch 'master' into next
Andre Noll [Thu, 12 Nov 2009 21:12:46 +0000 (22:12 +0100)]
Merge branch 'master' into next

14 years agonew codename, reset version to git
Andre Noll [Tue, 10 Nov 2009 17:22:58 +0000 (18:22 +0100)]
new codename, reset version to git

14 years agothe paraslash-0.4.0 release tarball
Andre Noll [Tue, 10 Nov 2009 16:51:56 +0000 (17:51 +0100)]
the paraslash-0.4.0 release tarball

14 years agoparaslash 0.4.0 v0.4.0
Andre Noll [Tue, 10 Nov 2009 16:44:00 +0000 (17:44 +0100)]
paraslash 0.4.0

14 years agoMerge commit 'meins/next' into next
Andre Noll [Mon, 9 Nov 2009 17:31:34 +0000 (18:31 +0100)]
Merge commit 'meins/next' into next

14 years agoMerge branch 'master' into next
Andre Noll [Mon, 9 Nov 2009 17:31:25 +0000 (18:31 +0100)]
Merge branch 'master' into next

14 years agoMerge commit 'meins/master'
Andre Noll [Mon, 9 Nov 2009 17:31:09 +0000 (18:31 +0100)]
Merge commit 'meins/master'

14 years agoMerge branch 'maint'
Andre Noll [Mon, 9 Nov 2009 17:31:01 +0000 (18:31 +0100)]
Merge branch 'maint'

14 years agoMerge commit 'meins/maint' into maint
Andre Noll [Mon, 9 Nov 2009 17:30:26 +0000 (18:30 +0100)]
Merge commit 'meins/maint' into maint

14 years agoMerge branch 'master' into next
Andre Noll [Sat, 7 Nov 2009 13:37:54 +0000 (14:37 +0100)]
Merge branch 'master' into next

14 years agoMerge branch 'maint'
Andre Noll [Sat, 7 Nov 2009 13:07:43 +0000 (14:07 +0100)]
Merge branch 'maint'

14 years agoalsa: Avoid using 0 as a NULL pointer.
Andre Noll [Sat, 7 Nov 2009 13:06:55 +0000 (14:06 +0100)]
alsa: Avoid using 0 as a NULL pointer.

Found by sparse.

14 years agofecdec_filter: Avoid potentially expensive pointer subtraction.
Andre Noll [Sat, 7 Nov 2009 13:05:18 +0000 (14:05 +0100)]
fecdec_filter: Avoid potentially expensive pointer subtraction.

Found by sparse.

14 years agoMake some blob functions static.
Andre Noll [Sat, 7 Nov 2009 13:03:36 +0000 (14:03 +0100)]
Make some blob functions static.

14 years agoMerge branch 'master' into next
Andre Noll [Fri, 6 Nov 2009 14:25:35 +0000 (15:25 +0100)]
Merge branch 'master' into next

14 years agoMerge branch 'maint'
Andre Noll [Fri, 6 Nov 2009 14:22:10 +0000 (15:22 +0100)]
Merge branch 'maint'

14 years agoMerge commit 'meins/maint' into maint
Andre Noll [Fri, 6 Nov 2009 14:19:32 +0000 (15:19 +0100)]
Merge commit 'meins/maint' into maint

14 years agoReplace assertion for invalid audio formats by a runtime check.
Andre Noll [Fri, 6 Nov 2009 14:07:18 +0000 (15:07 +0100)]
Replace assertion for invalid audio formats by a runtime check.

In case one switches back and forth between different versions of
para_server that support different audio formats, it may happen
that the aft table contains entries for audio formats that are not
supported by the version currently running.

ATM, this causes para_server to die immediately because of the
assertion in audio_format_name. Replace the assertion by a less
draconian run time check that returns the string "???" if the number
for an unknown audio file format is being looked up.

14 years agoMerge branch 'master' into next
Andre Noll [Thu, 5 Nov 2009 23:28:05 +0000 (00:28 +0100)]
Merge branch 'master' into next

14 years agoMerge branch 'maint'
Andre Noll [Thu, 5 Nov 2009 23:27:40 +0000 (00:27 +0100)]
Merge branch 'maint'

Conflicts:
server.c

14 years agoserver: Fix assignment of afs_pid.
Andre Noll [Thu, 5 Nov 2009 23:21:16 +0000 (00:21 +0100)]
server: Fix assignment of afs_pid.

glibc-2.11 revealed the following bug in init_afs(): The assignment

mmd->afs_pid = fork();

results in undefined behaviour because fork() returns twice and mmd->afs_pid lives
in a shared memory area. Depending on whether the child runs first, this results in
mmd->afs_pid being either zero or the pid of the afs child process.

mmd->afs_pid being zero seems to happen always with glibc-2.11 and has rather
strange consequences:

First,  it causes para_server attempt to kill process 0 instead of the afs process on
exit. This fails because para_server never runs as root.  However, it may result in dirty
osl tables as the afs process might access mmd after the shared memory area containing
mmd has already been destroyed.

Second,  para_server fails to notice the death of the afs process, which is really bad and
may cause tons of error messages being written to the log.

Fix this bug by temporarily storing the afs pid in a local variable and setting mmd->afs_pid
only in the server (parent) process.

14 years agoMerge branch 'master' into next
Andre Noll [Thu, 5 Nov 2009 21:49:33 +0000 (22:49 +0100)]
Merge branch 'master' into next

14 years agoMerge branch 'maint'
Andre Noll [Thu, 5 Nov 2009 21:43:03 +0000 (22:43 +0100)]
Merge branch 'maint'

14 years agowng: Avoid buffer underruns due to filter chain output buffer constraints.
Andre Noll [Thu, 5 Nov 2009 21:42:52 +0000 (22:42 +0100)]
wng: Avoid buffer underruns due to filter chain output buffer constraints.

Using ogg vorbis streams together with the oss writer hits the following nasty bug:
In case the filter chain can provide more data than what fits into its output buffer,
it converts the maximal amount possible to completely fill its output buffer. However, the
time to play this data might be less than than the time until the next data packet arrives
from the upper layers, especially when using ogg vorbis streams and FEC.

Since the filter chain task has no pre_select function,  the convert function(s) of its filter
nodes only get the chance to convert more data until the next select call returns, which
might already be too late.

This patch fixes the bug by teaching the pre_select function of the writer node group
to  remember whether something was written during the previous call  to wng_post_select().
In this case we force a minimal timeout for select, i.e. the next call to select() will return
immediately and the convert functions of the filter node are called again, hopefully converting
more data for the writer node group.

14 years agooss_post_select(): Kill unused attribute for the struct sched parameter.
Andre Noll [Thu, 5 Nov 2009 21:23:13 +0000 (22:23 +0100)]
oss_post_select(): Kill unused attribute for the struct sched parameter.

This parameter _is_ used.

14 years agooss_pre_select(): Fix check for empty infput buffer.
Andre Noll [Thu, 5 Nov 2009 21:21:38 +0000 (22:21 +0100)]
oss_pre_select(): Fix check for empty infput buffer.

We must take into account the number of bytes already written, and we can not write less
than a single frame.

14 years agoMerge commit 'meins/maint' into maint
Andre Noll [Sun, 25 Oct 2009 16:47:50 +0000 (17:47 +0100)]
Merge commit 'meins/maint' into maint

14 years agoMerge branch 'master' into next
Andre Noll [Sat, 24 Oct 2009 19:24:56 +0000 (21:24 +0200)]
Merge branch 'master' into next

14 years agoMerge branch 'maint'
Andre Noll [Sat, 24 Oct 2009 19:24:33 +0000 (21:24 +0200)]
Merge branch 'maint'

14 years agovss: Fix computation of extra slices.
Andre Noll [Sat, 24 Oct 2009 19:03:06 +0000 (21:03 +0200)]
vss: Fix computation of extra slices.

On stream start we check in setup_next_fec_group() whether the FEC
parameters requested by the client are sufficient for the current audio
file. We want each FEC group contain at least one non-header slice.

Since header slices can not contain any non-header data, the number
of required slices is given by the number of slices needed for the
header plus the number of slices needed for the largest chunk of the
audio file.

The current code gets this wrong because it computes the number of
slices needed for the header plus the largest chunk, which may be
strictly less than what is actually needed. IOW, the inequality

  num_slices(header + chunk) <= num_slices(header) + num_slices(chunk)

may be strict.

This bug could trigger the assertion assert(g->num_chunks) further
down in setup_next_fec_group().

This patch fixes this bug and also changes a log message in
udp_init_session() which always printed the requested FEC parameters,
not considering extra slices.

14 years agoMerge commit 'meins/maint' into maint
Andre Noll [Fri, 23 Oct 2009 08:38:17 +0000 (10:38 +0200)]
Merge commit 'meins/maint' into maint

14 years agoMerge branch 'maint' into next
Andre Noll [Thu, 22 Oct 2009 20:51:20 +0000 (22:51 +0200)]
Merge branch 'maint' into next

14 years agoMerge branch 'maint'
Andre Noll [Thu, 22 Oct 2009 20:51:09 +0000 (22:51 +0200)]
Merge branch 'maint'

14 years agopopulate_user_list(): Use correct buffer size.
Andre Noll [Thu, 22 Oct 2009 20:50:58 +0000 (22:50 +0200)]
populate_user_list(): Use correct buffer size.

"line" is defined as a 255 byte buffer. Use sizeof(line) rather than MAXLINE in the call
to para_fgets().

This is not a real bug though as MAXLINE happens to be 255 as well.

14 years agodaemon: Avoid using MAXLINE.
Andre Noll [Thu, 22 Oct 2009 20:47:19 +0000 (22:47 +0200)]
daemon: Avoid using MAXLINE.

MAXLINE is kind of depricated. Just use a 100 byte buffer and make the scope of the
buffer more local. Also, kill the pointless initialization to an empty string.

14 years agodrop_privileges_or_die(): Check return value of setuid().
Andre Noll [Thu, 22 Oct 2009 20:42:36 +0000 (22:42 +0200)]
drop_privileges_or_die(): Check return value of setuid().

The call to setuid() may fail, e.g. because it brings the process over its RLIMIT_NPROC
resource limit. So print an error message and exit in this case.

14 years agoMerge branch 'maint'
Andre Noll [Thu, 22 Oct 2009 17:24:44 +0000 (19:24 +0200)]
Merge branch 'maint'

14 years agofecdec: Fix decoding of the audio file header.
Andre Noll [Thu, 22 Oct 2009 17:21:10 +0000 (19:21 +0200)]
fecdec: Fix decoding of the audio file header.

The handling of the audio file header in the fecdec code is currently
broken: We output all decoded header slices although the last slice
might only be partially used.

This patch introduces the new fec_group_usability value
"FEC_GROUP_USABLE_WITH_HEADER" which gets used when streaming starts in
the middle of the file. In this case, after the group has been decoded,
we make sure that only h.audio_header_size many bytes are being written
to the output buffer. We then proceed to write the output corresponding
to the data slices as in the FEC_GROUP_USABLE_SKIP_HEADER case.

In paraslash-0.3. only ogg vorbis uses audio file headers, and the
ogg code is quite forgiving and successfully resyncs the stream,
which is why this bug was never noticed. However, the wma decoder of
paraslash-0.4 fails badly due to the garbage that is written after
the header.

14 years agoMerge branch 'maint'
Andre Noll [Fri, 16 Oct 2009 13:36:15 +0000 (15:36 +0200)]
Merge branch 'maint'

14 years agoFix error message in case of missing sys/soundcard.h.
Andre Noll [Fri, 16 Oct 2009 13:35:00 +0000 (15:35 +0200)]
Fix error message in case of missing sys/soundcard.h.

The error message still printed linux/soundcard.h which might
confuse non-linux users.

14 years agoFix compilation on MacOS.
Andre Noll [Fri, 16 Oct 2009 13:34:19 +0000 (15:34 +0200)]
Fix compilation on MacOS.

osx_write.c needs to include regex.h.

14 years agoMakefile.in: Introduce quiet mode and use it by default.
Andre Noll [Wed, 7 Oct 2009 01:15:56 +0000 (03:15 +0200)]
Makefile.in: Introduce quiet mode and use it by default.

Verbose mode can be chosen via "make V=1".

14 years agoMerge branch 'maint'
Andre Noll [Tue, 6 Oct 2009 21:16:27 +0000 (23:16 +0200)]
Merge branch 'maint'

14 years agoAdd *_command_list.c to .gitignore.
Andre Noll [Tue, 6 Oct 2009 21:16:11 +0000 (23:16 +0200)]
Add *_command_list.c to .gitignore.

14 years agoAdd GIT-VERSION-FILE to .gitignore.
Andre Noll [Tue, 6 Oct 2009 21:13:52 +0000 (23:13 +0200)]
Add GIT-VERSION-FILE to .gitignore.

14 years agoMerge branch 'maint'
Andre Noll [Tue, 6 Oct 2009 20:01:59 +0000 (22:01 +0200)]
Merge branch 'maint'

14 years agoUse para_malloc() instead of malloc() everywhere.
Andre Noll [Tue, 6 Oct 2009 20:00:55 +0000 (22:00 +0200)]
Use para_malloc() instead of malloc() everywhere.

14 years agoMerge branch 'maint'
Andre Noll [Tue, 6 Oct 2009 17:31:41 +0000 (19:31 +0200)]
Merge branch 'maint'

14 years agoogg: retry ov_open_callbacks() also on OV_EBADHEADER errors.
Andre Noll [Tue, 6 Oct 2009 17:31:17 +0000 (19:31 +0200)]
ogg: retry ov_open_callbacks() also on OV_EBADHEADER errors.

14 years agoPut the git version into all executables.
Andre Noll [Sun, 4 Oct 2009 13:57:33 +0000 (15:57 +0200)]
Put the git version into all executables.

This patch changes the -V output of all executables to print also
the git version which was used to make the executable. The idea and
the GIT-VERSION_GEN script was taken from git.git.

It also adds a VERSION file to the generated tarball. If this file
exists, its content is used as the version info rather than calling
git to obtain this info. This way, even if paraslash is built from
a tarball, the executables still contain the git version the tarball
was generated from.

14 years ago.gitignore: Ignore the objects directory.
Andre Noll [Thu, 1 Oct 2009 01:05:27 +0000 (03:05 +0200)]
.gitignore: Ignore the objects directory.

14 years agoAdd the depend.sh script.
Andre Noll [Thu, 1 Oct 2009 00:08:20 +0000 (02:08 +0200)]
Add the depend.sh script.

Oops, this should already have been included two commits ago..

14 years agoIntroduce clean2 target.
Andre Noll [Thu, 1 Oct 2009 00:07:16 +0000 (02:07 +0200)]
Introduce clean2 target.

This makes the clean target remove objects and binaries only. The new
clean2 target removes in addition the man dir and the object dir
(hence all .d files) completely.

14 years agoSwitch to one dependency file per C file.
Andre Noll [Thu, 1 Oct 2009 00:04:40 +0000 (02:04 +0200)]
Switch to one dependency file per C file.

This prevents to rebuild the full Makefile.deps every time. It also
tracks the dependencies for the cmdline.c files correctly.

14 years agoUse separate directory for objects.
Andre Noll [Wed, 30 Sep 2009 19:27:43 +0000 (21:27 +0200)]
Use separate directory for objects.

14 years agoStore gengetopt commandline files in a separate dir.
Andre Noll [Wed, 30 Sep 2009 13:47:14 +0000 (15:47 +0200)]
Store gengetopt commandline files in a separate dir.

Quite a bit of churn but it's hopefully worth the trouble.

14 years agoMerge commit 'meins/master'
Andre Noll [Mon, 28 Sep 2009 15:44:06 +0000 (17:44 +0200)]
Merge commit 'meins/master'

14 years agoUpdate overview.sk to paraslash-0.4.
Andre Noll [Mon, 28 Sep 2009 12:42:13 +0000 (14:42 +0200)]
Update overview.sk to paraslash-0.4.

14 years agoThe new paraslash-0.4 logo.
Andre Noll [Mon, 28 Sep 2009 12:25:28 +0000 (14:25 +0200)]
The new paraslash-0.4 logo.

14 years agoRemove "pics" from the directory list to be removed from the tarball.
Andre Noll [Mon, 28 Sep 2009 12:19:36 +0000 (14:19 +0200)]
Remove "pics" from the directory list to be removed from the tarball.

It no longer exists.

14 years agoReset version to "git".
Andre Noll [Mon, 28 Sep 2009 12:12:51 +0000 (14:12 +0200)]
Reset version to "git".

14 years agoMove images and screenshots into the web directory.
Andre Noll [Mon, 28 Sep 2009 12:10:27 +0000 (14:10 +0200)]
Move images and screenshots into the web directory.

14 years agoRemove default.jpg.
Andre Noll [Mon, 28 Sep 2009 11:38:11 +0000 (13:38 +0200)]
Remove default.jpg.

It is unused since paraslash-0.3.0.

14 years agoMerge branch 'master' into next
Andre Noll [Thu, 24 Sep 2009 12:26:45 +0000 (14:26 +0200)]
Merge branch 'master' into next

Conflicts:

NEWS

14 years agoreset version to git
Andre Noll [Thu, 24 Sep 2009 12:25:58 +0000 (14:25 +0200)]
reset version to git

14 years agoMerge branch 'master' into next
Andre Noll [Mon, 21 Sep 2009 20:19:02 +0000 (22:19 +0200)]
Merge branch 'master' into next

Conflicts:
NEWS

14 years agothe paraslash-0.3.5 release tarball
Andre Noll [Mon, 21 Sep 2009 10:52:54 +0000 (12:52 +0200)]
the paraslash-0.3.5 release tarball

14 years agoparaslash 0.3.5 v0.3.5
Andre Noll [Mon, 21 Sep 2009 10:48:04 +0000 (12:48 +0200)]
paraslash 0.3.5

14 years agoMerge commit 'meins/master'
Andre Noll [Mon, 21 Sep 2009 07:37:06 +0000 (09:37 +0200)]
Merge commit 'meins/master'

14 years agoMerge commit 'meins/next' into next
Andre Noll [Mon, 21 Sep 2009 07:36:57 +0000 (09:36 +0200)]
Merge commit 'meins/next' into next

14 years agogui: Make album/comment layout look nicer.
Andre Noll [Sun, 20 Sep 2009 13:08:42 +0000 (15:08 +0200)]
gui: Make album/comment layout look nicer.

14 years agoMerge branch 'master' into next
Andre Noll [Sat, 19 Sep 2009 10:11:12 +0000 (12:11 +0200)]
Merge branch 'master' into next

Conflicts:
ogg_afh.c

14 years agoNEWS update.
Andre Noll [Sat, 19 Sep 2009 08:47:08 +0000 (10:47 +0200)]
NEWS update.

14 years agooggdec filter improvements.
Andre Noll [Sat, 19 Sep 2009 08:38:25 +0000 (10:38 +0200)]
oggdec filter improvements.

Try to open the ogg vorbis callbacks as soon as possible rather
than waiting until the input buffer reaches the given initial buffer
size. If that fails, try again later when more data is available but
fail if the input buffer size is larger than the initial buffer size
and we can still not open the ov callbacks.

Also, if a hole was detected, likely because we started streaming
in the middle of the file, add an additional delay to avoid buffer
underruns.

14 years agoComplete re-write of the ogg vorbis audio format handler.
Andre Noll [Sat, 19 Sep 2009 08:26:04 +0000 (10:26 +0200)]
Complete re-write of the ogg vorbis audio format handler.

The new code is quite a bit smaller, performes much better and chooses
a chunk time dependent on the average ogg page size rather than using
a hardcoded chunk time of 250ms.

14 years agofecdec: Defer decoding until the first slice of the second group arrives.
Andre Noll [Sat, 19 Sep 2009 08:21:48 +0000 (10:21 +0200)]
fecdec: Defer decoding until the first slice of the second group arrives.

Otherwise, this could lead to buffer underruns in the decoding application
in case slices are missed. So introdce group_completion_status which tracks
whether we already have received the first group sucessfully and are waiting
for the first slice of the next group.

14 years agoafh: Fix memory leak.
Andre Noll [Sat, 19 Sep 2009 08:18:14 +0000 (10:18 +0200)]
afh: Fix memory leak.

14 years agostdin: Increase input buffer size.
Andre Noll [Sat, 19 Sep 2009 08:16:23 +0000 (10:16 +0200)]
stdin: Increase input buffer size.

16K was a bit small for the ogg_decode filter.

14 years agotv_scale(): Avoid integer overflow.
Andre Noll [Sat, 19 Sep 2009 08:11:19 +0000 (10:11 +0200)]
tv_scale(): Avoid integer overflow.

Just use an uint64_t and compute everything in microseconds which even
simplifies the code a bit.

14 years agovss: Honor header chunk when computing FEC group start.
Andre Noll [Sat, 19 Sep 2009 08:08:59 +0000 (10:08 +0200)]
vss: Honor header chunk when computing FEC group start.

The first chunk of an ogg vorbis file is the audio file header
which should not be included in the calculation of the FEC
group timing.

14 years agoMerge branch 'master' into next
Andre Noll [Mon, 14 Sep 2009 08:09:38 +0000 (10:09 +0200)]
Merge branch 'master' into next

14 years agoMerge commit 'meins/master'
Andre Noll [Mon, 14 Sep 2009 08:08:57 +0000 (10:08 +0200)]
Merge commit 'meins/master'

14 years agoMinor documentation fixes.
Andre Noll [Mon, 14 Sep 2009 08:08:38 +0000 (10:08 +0200)]
Minor documentation fixes.

14 years agoFEC timing improvements.
Andre Noll [Sat, 12 Sep 2009 16:16:56 +0000 (18:16 +0200)]
FEC timing improvements.

Currently we compute the time of a FEC group as the number of
containing chunks times the chunk time. The time between sending
two slices therefore depends only on the number of chunks the group
contains. Groups containing many slices are sent with larger delays
than groups containing few slices.

This approach is not optimal for the following reason: Consider a group
containing only few slices which is followed by a group containing
many slices. This happens frequently at the end of VBR MP3 files which
contain some seconds of silence or applause at the end because this
last part is often encoded at a lower bitrate than the preceding part.

In this scenario buffer underruns in the receiving application can
easily occur if the previous FEC group has been decoded and completely
fed to the writer before enough slices of the next group have arrived
to decode the second group.

This patch changes the timing of FEC groups such that all but the
first group use the duration of the _previous_ group as the basis
for the timing.

14 years agovss_send(): Fix EOF-check for FEC clients.
Andre Noll [Sat, 12 Sep 2009 16:13:36 +0000 (18:13 +0200)]
vss_send(): Fix EOF-check for FEC clients.

If the last chunk has been sent to all http/dccp clients we have
to wait until the last FEC group has been sent before setting the
NEXT flag that causes all senders to shut down its clients. The old
code tested if a slice was sent to any FEC  client during vss_send()
and set the NEXT flag if nothing was sent.

However, this is not sufficient as there may be still slices available
which have to be sent at some future time. This patch teaches
vss_send() to detect this condition. It also renames the boolean
variable sent_something to fec_active, which is more to the point.