Andre Noll [Mon, 21 Dec 2009 10:35:43 +0000 (11:35 +0100)]
wma: Fix two gcc warnings on Slow Leopard:
Fixes
wma_common.c: In function 'search_pattern':
wma_common.c:41: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'long int'
wma_common.c: In function 'find_audio_stream_info':
wma_common.c:59: warning: format '%0x' expects type 'unsigned int', but argument 4 has type 'long int'
The cast is neccessary because the type of a pointer difference is
implementation-defined...
Andre Noll [Sat, 19 Dec 2009 15:50:28 +0000 (16:50 +0100)]
audiod: Avoid starting the wrong decoder on server restarts.
If para_server is restarted and starts streaming using another audio format than
the one used before the restart, para_audiod might end up starting the decoder
associated with the old audio format.
Fix this by invalidating current_audio_format_num in close_stat_pipe() which is
called when the server goes away.
Andre Noll [Sat, 19 Dec 2009 13:14:45 +0000 (14:14 +0100)]
Do not include dependency files if make command goals contain "clean".
Calling "make clean2" was particularly annoying because it first regenerated the
dependency files it is supposed to remove.
Unfortunately, this patch breaks multiple goals if one of them matches "clean".
For example "make clean all" does no longer work. But as this can easily be worked
around by calling "make clean && make all", we don't care.
Andre Noll [Sat, 19 Dec 2009 12:13:53 +0000 (13:13 +0100)]
http_send: Send http OK message earlier.
Without this change, the http OK message is sent just when the vss is about to start
streaming, i.e. at the end of the announce interval. This might be too late and sometimes
causes the client to not receive the first chunk(s).
Fix this bug by adding the client file descriptor to the write fd set in http_preselect()
in case we received the get request (or something else) so that the following call
to select() will return immediately. The http OK message (or an error message) will
then be sent much earlier.
Andre Noll [Sat, 19 Dec 2009 00:19:18 +0000 (01:19 +0100)]
Avoid unnecessary regeneration of dependencies.
Change depend.sh so that it can handles foo.cmdline.h and cmdline/foo.cmdline.h
dependencies correctly. This way we no longer need to depend on $(cmdline_generated).
Andre Noll [Mon, 7 Dec 2009 17:43:26 +0000 (18:43 +0100)]
Fix two gcc warnings on MAC OS.
This fixes:
wma_common.c:41: warning: format '%zd' expects type 'signed size_t', but argument 5 has type 'int'
wma_common.c:59: warning: format '%0zx' expects type 'size_t', but argument 4 has type 'int'
Andre Noll [Sun, 6 Dec 2009 14:17:22 +0000 (15:17 +0100)]
afh: Implement --human option.
During debugging or when analyzing corrupt audio files, it is somethimes
handy to look at the chunk table. This option makes it much easier for the
human eye to spot e.g. huge chunks of an audio file which are sometimes
caused by incomplete downloads.
Andre Noll [Mon, 30 Nov 2009 22:50:48 +0000 (23:50 +0100)]
fecdec: Wait until the second FEC group is complete.
Currently the fecdec filter starts writing output as soon as the first slice of the
second group arrives. This makes the logic in fecdec_filter.c quite convoluted
and does not help much to avoid buffer underruns.
Waiting for completion of the second group simplifies the code quite a bit and
adds more more buffering to the fecdec filter which should make buffer underruns
less likely.
Andre Noll [Fri, 27 Nov 2009 19:36:23 +0000 (20:36 +0100)]
FEC: Improve and simplify group timing.
The computation of the group start time was not as accurate as it
could be because it did not take into account that the first FEC
group has to be taken into account twice. This could lead to buffer
underruns between the first and the second group.
This patch fixes this flaw by computing the group start start(n)
of the nth FEC group as
start(n) = start(n - 1) + duration(n - 1),
which is not only more accurate but also a bit simpler than what we
had before. In order to do so, we have to remember the duration of
the previous group. The new ->duration member of struct fec_group is
used for this purpose.
The patch also renames set_slice_duration() to set_group_timing() as
this function now computes and stores both the slice duration and the
group duration.
Andre Noll [Thu, 12 Nov 2009 21:08:09 +0000 (22:08 +0100)]
wma: Decode as much as possible.
Currently, we only decode at most one superframe during each
scheduler run. This patch makes the wma decoder as much as what
fits into the output buffer.