]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Add Infrastructure for dynamic header computation.
authorAndre Noll <maan@systemlinux.org>
Sun, 3 Oct 2010 11:07:42 +0000 (13:07 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 29 Jan 2011 10:43:33 +0000 (11:43 +0100)
vorbis allows to add arbitrary many comments to an audio file. These
comments are stored in ogg packet #2, which is part of the audio file
header of ogg vorbis files. Hence ogg/vorbis headers may be arbitrary
large. Since the header is sent periodically, this wastes bandwidth
and may cause FEC parameters to become unnecessary large.

This introductory patch paves the way for replacing ogg packet #2 at
stream time by a dummy packet with does not contain any comments and
is therefore of bounded size.

In order to do so, we need audio file headers which are not necessarily
an unmodified portion of the audio file. Therefore we call back into
the audio format handler code at stream time to compute an appropriate
audio file header.  Hence an optional new method ->get_header() is
added to struct audio_format_hander. If it is non-NULL, is is called
instead of using the first header_len bytes of the file.

Unfortunately, this implies that the virtual streaming system must
be aware of the audio format id in order to know which get_header()
method should be called. Thus we store the audio format id in struct
audio_file_data which is passed from the afs process to the server
process. Vss then calls afh_get_header() with the audio format id as
an additional argument.

ATM, the new functionality is not yet used as as no audio format
handler defines ->get_header() yet.


No differences found