]> git.tuebingen.mpg.de Git - paraslash.git/commit - afh.c
The wma tagger.
authorAndre Noll <maan@systemlinux.org>
Sun, 27 Oct 2013 17:50:14 +0000 (18:50 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Apr 2015 12:13:34 +0000 (14:13 +0200)
commit5e12f77a5b2a76c8a6f19a96958e0992962573db
tree629e10c4c981ebe832b7272ad7974ab2b08f9ca1
parent1a8e3628040a94a8c06027335962a6cb2f827a63
The wma tagger.

This adds infrastructure to support meta tag editing. If the new
--modify option is given to para_afh, the arguments to --title,
--artist, --album and --comment are used to alter the meta information
of the audio file. Only the wma audio format handler is extended
to support the new feature. Patches for other audio format handlers
follow.

As for the implementation, this commit adds the function pointer
->rewrite_tags to struct audio_format_handler.  This function takes
a file descriptor to a newly opened temporary file. The individual
audio format handlers are supposed to write the altered contents to
this file descriptor. On success, the temporary file is renamed on
top of the original file unless --backup is given.

Since meta tags in wma files are encoded in UTF-16 we need primitives
to convert from UTF8 to UTF16 and vice versa. These are provided by
libiconv, so we check for this library and deactivate the new features
on systems that lack libiconv.

Unfortunately the signatures of iconv() are different between Linux
and FreeBSD. To deal with this incompatibility this patch adds a
configure check to determine if the cast is necessary.
FEATURES
Makefile.in
Makefile.real
afh.c
afh.h
afh_common.c
configure.ac
fd.c
fd.h
m4/gengetopt/afh.m4
wma_afh.c