[renamed] cdtext_languages_available to cdtext_list_languages
[fixed] C++ CD-Text API [fixed] C++ CD-Text example
This commit is contained in:
@@ -101,9 +101,12 @@ void possible_throw_device_exception(driver_return_code_t drc);
|
||||
class CdioCDText
|
||||
{
|
||||
public:
|
||||
CdioCDText()
|
||||
CdioCDText(cdtext_t *cdtext)
|
||||
{
|
||||
p_cdtext = cdtext_init(); // make sure we're initialized on the C side
|
||||
if (NULL == cdtext)
|
||||
cdtext = cdtext_init();
|
||||
|
||||
p_cdtext = cdtext;
|
||||
}
|
||||
|
||||
~CdioCDText()
|
||||
|
||||
@@ -52,12 +52,6 @@ char *get (cdtext_field_t key, track_t i_track)
|
||||
return cdtext_get (p_cdtext, key, i_track);
|
||||
}
|
||||
|
||||
/*! returns the C cdtext_t pointer associated with this object. */
|
||||
cdtext_t *get ()
|
||||
{
|
||||
return p_cdtext;
|
||||
}
|
||||
|
||||
/*! returns a const string associated with the given field. NULL is
|
||||
returned if key is CDTEXT_INVALID or the field is not set.
|
||||
|
||||
@@ -81,6 +75,30 @@ void set (cdtext_field_t key, track_t i_track, const uint8_t *value, const char
|
||||
cdtext_set (p_cdtext, key, value, i_track, charset);
|
||||
}
|
||||
|
||||
/*!
|
||||
returns the selected language
|
||||
*/
|
||||
cdtext_lang_t getLanguage()
|
||||
{
|
||||
return cdtext_get_language(p_cdtext);
|
||||
}
|
||||
|
||||
/*!
|
||||
selects a language
|
||||
*/
|
||||
bool selectLanguage(const char *lang)
|
||||
{
|
||||
return cdtext_select_language(p_cdtext, lang);
|
||||
}
|
||||
|
||||
/*!
|
||||
returns a list of available languages
|
||||
*/
|
||||
cdtext_lang_t *listLanguages()
|
||||
{
|
||||
return cdtext_list_languages(p_cdtext);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
||||
@@ -170,13 +170,18 @@ bool isDiscmodeDvd (discmode_t 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 ()
|
||||
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.
|
||||
*/
|
||||
CdioCDText *getCdtext ()
|
||||
{
|
||||
return cdio_get_cdtext (p_cdio);
|
||||
cdtext_t *cdtext = cdio_get_cdtext (p_cdio);
|
||||
|
||||
if (NULL == cdtext)
|
||||
return (CdioCDText *) NULL;
|
||||
else
|
||||
return new CdioCDText(cdtext);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user