1) cdtext objects are no longer associated with a track but with the disc.
2) - cdio_get_cdtext no longer takes track as an argument - cdtext_get, cdtext_get_const, cdtext_set require track argument 3) Language, Genre, Genre Code and Encoding Fields are now properly parsed and stored in the cdtext object 4) Added public function cdio_get_cdtext_raw to extract the binary CD-Text 5) Added CDTEXTFILE keyword logic in cue sheet parser. Parses binary/raw CD-Text files 6) Added cdtext_genre2str to convert genre code 7) altered the example programs, test drivers, cdda-player and cd-info to work with these changes 8) Added test case 9) A few smaller changes A disc either holds CD-Text for all the tracks or does not hold any. Therefore a CD-Text object for the whole disc seems more natural to me. It also enables us to store global fields, like genre, encoding, language. Patch was tested on GNU/Linux 32 bit running Gentoo.
This commit is contained in:
@@ -37,9 +37,9 @@ const char *field2str (cdtext_field_t i)
|
||||
have to be freed.
|
||||
|
||||
*/
|
||||
char *get (cdtext_field_t key)
|
||||
char *get (cdtext_field_t key, track_t i_track)
|
||||
{
|
||||
return cdtext_get (key, p_cdtext);
|
||||
return cdtext_get (key, i_track, p_cdtext);
|
||||
}
|
||||
|
||||
/*! returns the C cdtext_t pointer associated with this object. */
|
||||
@@ -58,9 +58,9 @@ cdtext_t *get ()
|
||||
cdtext object.
|
||||
|
||||
*/
|
||||
const char *getConst (cdtext_field_t key)
|
||||
const char *getConst (cdtext_field_t key, track_t i_track)
|
||||
{
|
||||
return cdtext_get_const (key, p_cdtext);
|
||||
return cdtext_get_const (key, i_track, p_cdtext);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -75,9 +75,9 @@ cdtext_field_t isKeyword (const char *key)
|
||||
/*!
|
||||
sets cdtext's keyword entry to field
|
||||
*/
|
||||
void set (cdtext_field_t key, const char *value)
|
||||
void set (cdtext_field_t key, track_t i_track, const char *value)
|
||||
{
|
||||
cdtext_set (key, value, p_cdtext);
|
||||
cdtext_set (key, i_track, value, p_cdtext);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -82,14 +82,6 @@ CdIo_t *getCdIo()
|
||||
return p_cdio;
|
||||
}
|
||||
|
||||
/*!
|
||||
Return an opaque CdIo_t pointer for the given track object.
|
||||
*/
|
||||
cdtext_t *getCdtext(track_t i_track)
|
||||
{
|
||||
return cdio_get_cdtext (p_cdio, i_track);
|
||||
}
|
||||
|
||||
/*!
|
||||
Get the CD device name for the object.
|
||||
|
||||
|
||||
@@ -171,4 +171,14 @@ bool isDiscmodeDvd (discmode_t discmode)
|
||||
return cdio_is_discmode_dvd (discmode) ;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get CD-Text information for a CdIo_t object.
|
||||
*
|
||||
* @return the CD-Text object or NULL if obj is NULL
|
||||
* or CD-Text information does not exist.
|
||||
* */
|
||||
cdtext_t *getCdtext ()
|
||||
{
|
||||
return cdio_get_cdtext (p_cdio);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,17 +30,6 @@ CdIo_t *getCdIo()
|
||||
return p_cdio;
|
||||
}
|
||||
|
||||
/*!
|
||||
Get CD-Text information for a CdIo_t object.
|
||||
|
||||
@return the CD-Text object or NULL if obj is NULL
|
||||
or CD-Text information does not exist.
|
||||
*/
|
||||
cdtext_t *getCdtext ()
|
||||
{
|
||||
return cdio_get_cdtext (p_cdio, i_track);
|
||||
}
|
||||
|
||||
/*! Return number of channels in track: 2 or 4; -2 if not
|
||||
implemented or -1 for error.
|
||||
Not meaningful if track is not an audio track.
|
||||
|
||||
Reference in New Issue
Block a user