]> git.tuebingen.mpg.de Git - paraslash.git/commit
Revamp status item handling.
authorAndre Noll <maan@systemlinux.org>
Sat, 4 Jul 2009 13:52:39 +0000 (15:52 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 4 Jul 2009 13:52:39 +0000 (15:52 +0200)
commit337d7784b0f8bc30b1fa9af56ace503acd97d40d
treeecbfce89a99a223d2043200bbf909cdbab4b09eb
parentf70b292af4612e44241574b3ac6cd069eafed337
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.
17 files changed:
afs.cmd
afs.h
aft.c
amp_filter.c
audiod.c
audiod.cmd
audiod.h
audiod_command.c
command.c
compress_filter.c
error.h
gui.c
para.h
server.cmd
stat.c
string.c
string.h