[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libcdio-devel] Some ideas for cd-text
From: |
Leon Merten Lohse |
Subject: |
[Libcdio-devel] Some ideas for cd-text |
Date: |
Wed, 25 May 2011 19:12:03 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 |
Hello,
I would like to suggest a few additions to the cdtext api. Unfortunately
this would mean to change how cdtext is stored internally.
new public functions:
/* these are useful for testing. Raw cdtext is less than 5K, thus very
portable. This enables us to test cdtext routines on different machines
with the exact same conditions, without having to send the physical
disc. Raw cdtext data can also be used by cdrecord to author a audio cd.
cdda2wav also creates a file audio.cdtext; which is exactly the same */
/* reads raw cdtext from disc and returns it in a malloc'ed char buffer */
char * cdio_get_cdtext_raw(CdIo_t*);
// or int cdio_get_cdtext_raw(CdIo_t*, void*, int)
/* inits a cdtext structure from raw cdtext data - useful for testing */
bool cdio_init_cdtext_raw(CdIo_t*, void *);
/* returns encoding of cdtext - "ASCII", "ISO-8859-1" or "SHIFT-JIS" */
char * or CDTEXT_CHARSET cdtext_get_charset(cdtext_t*)
/* returns language of the cdtext - i don't know if there is a single cd
that does not have this set to english */
char * or CDTEXT_LANG cdtext_get_language(cdtext_t*)
/* same as now. explanation follows */
char * cdtext_get_track(cdtext_field_t*, const cdtext_t*)
I would like to change cdtext_field_t from only storing the info for a
single track to store the cdtext for the whole disc. This would have two
benefits:
A. cleaner code. all the cdtext functionality could be in cdtext.c. Now
cdtext_set_field can be found in quite some files, and passed as an
argument to several functions.
B. easy storage of binary fields (like BLOCKSIZE which stores language,
encoding, a useful cdtext toc). Sure, we could just put it in one of the
fields now. That might result in ugly output though, if a user simply
prints all the fields.
Another idea that came when I saw utf8.c was to convert all strings that
were read to utf8. But I do not know if that is necessary just to make
live easier for some potential freaks in deepest Japan.
Want to get this out of my head :-)
What do you think?
Regards
Leon
- [Libcdio-devel] Some ideas for cd-text,
Leon Merten Lohse <=