Commit ed58d07d authored by Jean-Paul Saman's avatar Jean-Paul Saman

Fix indentation.

parent 117e2de0
......@@ -58,7 +58,7 @@ struct input_item_t
char *psz_name; /**< text describing this item */
char *psz_uri; /**< mrl of this item */
bool b_fixed_name; /**< Can the interface change the name ?*/
bool b_fixed_name; /**< Can the interface change the name ?*/
int i_options; /**< Number of input options */
char **ppsz_options; /**< Array of input options */
......@@ -403,7 +403,7 @@ typedef struct
{
char *psz_name;
bool b_menu; /* Is it a menu or a normal entry */
bool b_menu; /* Is it a menu or a normal entry */
int64_t i_length; /* Length(microsecond) if known, else 0 */
int64_t i_size; /* Size (bytes) if known, else 0 */
......@@ -467,6 +467,7 @@ static inline input_title_t *vlc_input_title_Duplicate( input_title_t *t )
return dup;
}
/*****************************************************************************
* Attachments
*****************************************************************************/
......@@ -479,6 +480,7 @@ struct input_attachment_t
int i_data;
void *p_data;
};
static inline input_attachment_t *vlc_input_attachment_New( const char *psz_name,
const char *psz_mime,
const char *psz_description,
......@@ -517,6 +519,7 @@ static inline void vlc_input_attachment_Delete( input_attachment_t *a )
free( a->p_data );
free( a );
}
/*****************************************************************************
* input defines/constants.
*****************************************************************************/
......
......@@ -229,7 +229,7 @@ void
CDDAMetaInfoInit( access_t *p_access )
{
cdda_data_t *p_cdda = (cdda_data_t *) p_access->p_sys;
if ( ! p_cdda ) return;
dbg_print( (INPUT_DBG_CALL), "p_cdda->i_tracks %d",
......@@ -252,11 +252,11 @@ CDDAMetaInfoInit( access_t *p_access )
{
track_t i_track;
for( i_track = 0 ; i_track < p_cdda->i_tracks ; i_track++ )
{
p_cdda->p_cdtext[i_track] =
cdio_get_cdtext(p_cdda->p_cdio, i_track);
}
for( i_track = 0 ; i_track < p_cdda->i_tracks ; i_track++ )
{
p_cdda->p_cdtext[i_track] =
cdio_get_cdtext(p_cdda->p_cdio, i_track);
}
}
}
......@@ -273,7 +273,7 @@ CDDAMetaInfo( access_t *p_access, track_t i_track )
cdda_data_t *p_cdda = (cdda_data_t *) p_access->p_sys;
char *psz_meta_title = CDDAFormatMRL( p_access, i_track );
char *psz_meta_artist = NULL;
if ( ! p_cdda ) return;
dbg_print( (INPUT_DBG_CALL), "i_track %d", i_track );
......@@ -284,43 +284,42 @@ CDDAMetaInfo( access_t *p_access, track_t i_track )
if ( p_cdda->b_cddb_enabled && p_cdda->cddb.disc )
{
if( CDIO_INVALID_TRACK == i_track )
{
{
psz_meta_title = (char *)cddb_disc_get_title(p_cdda->cddb.disc);
psz_meta_artist = (char *)cddb_disc_get_artist(p_cdda->cddb.disc);
if ( cddb_disc_get_genre(p_cdda->cddb.disc) &&
strlen(cddb_disc_get_genre(p_cdda->cddb.disc)) )
add_cddb_meta(genre, vlc_meta_Genre);
if ( 0 != cddb_disc_get_year(p_cdda->cddb.disc))
add_cddb_meta_fmt(year, "%d", vlc_meta_Date );
}
else
{
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc, i_track-1);
if (t != NULL )
{
if( cddb_track_get_title(t) != NULL && ! p_cdda->b_nav_mode )
{
add_meta_val( vlc_meta_Title, cddb_track_get_title(t) );
}
if( cddb_track_get_artist(t) != NULL )
{
add_meta_val( vlc_meta_Artist, cddb_track_get_artist(t) );
}
}
}
psz_meta_title = (char *)cddb_disc_get_title(p_cdda->cddb.disc);
psz_meta_artist = (char *)cddb_disc_get_artist(p_cdda->cddb.disc);
if ( cddb_disc_get_genre(p_cdda->cddb.disc) &&
strlen(cddb_disc_get_genre(p_cdda->cddb.disc)) )
add_cddb_meta(genre, vlc_meta_Genre);
if ( 0 != cddb_disc_get_year(p_cdda->cddb.disc))
add_cddb_meta_fmt(year, "%d", vlc_meta_Date );
}
else
{
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc, i_track-1);
if (t != NULL )
{
if( cddb_track_get_title(t) != NULL && ! p_cdda->b_nav_mode )
{
add_meta_val( vlc_meta_Title, cddb_track_get_title(t) );
}
if( cddb_track_get_artist(t) != NULL )
{
add_meta_val( vlc_meta_Artist, cddb_track_get_artist(t) );
}
}
}
}
#endif /*HAVE_LIBCDDB*/
#define TITLE_MAX 30
{
track_t i = p_cdda->i_tracks;
const int i_first_track = p_cdda->i_first_track;
char psz_buffer[MSTRTIME_MAX_SIZE];
unsigned int i_track_frames =
cdio_get_track_lba(p_cdda->p_cdio, CDIO_CDROM_LEADOUT_TRACK);
unsigned int i_track_frames =
cdio_get_track_lba(p_cdda->p_cdio, CDIO_CDROM_LEADOUT_TRACK);
mtime_t i_duration = i_track_frames / CDIO_CD_FRAMES_PER_SEC;
dbg_print( INPUT_DBG_META, "Duration %ld, tracks %d",
......@@ -329,37 +328,36 @@ CDDAMetaInfo( access_t *p_access, track_t i_track )
_("Disc"), _("Duration"), "%s",
secstotimestr( psz_buffer, i_duration ) );
if (p_cdda->psz_mcn) {
input_Control( p_cdda->p_input, INPUT_ADD_INFO,
_("Disc"), _("Media Catalog Number (MCN)"), "%s",
p_cdda->psz_mcn );
input_Control( p_cdda->p_input, INPUT_ADD_INFO,
_("Disc"), _("Tracks"), "%d", p_cdda->i_tracks );
}
if (p_cdda->psz_mcn)
{
input_Control( p_cdda->p_input, INPUT_ADD_INFO,
_("Disc"), _("Media Catalog Number (MCN)"), "%s",
p_cdda->psz_mcn );
input_Control( p_cdda->p_input, INPUT_ADD_INFO,
_("Disc"), _("Tracks"), "%d", p_cdda->i_tracks );
}
#ifdef HAVE_LIBCDDB
if (p_cdda->b_cddb_enabled && p_cdda->cddb.disc)
{
add_cddb_disc_info_str("Artist (CDDB)", artist);
if ( CDDB_CAT_INVALID != cddb_disc_get_category(p_cdda->cddb.disc) )
add_info_str("Disc", "Category (CDDB)",
CDDB_CATEGORY[cddb_disc_get_category(p_cdda->cddb.disc)]);
add_cddb_disc_info_val("Disc ID (CDDB)", "%x", discid);
add_cddb_disc_info_str("Extended Data (CDDB)", ext_data);
add_cddb_disc_info_str("Genre (CDDB)", genre);
add_cddb_disc_info_str("Title (CDDB)", title);
if ( 0 != cddb_disc_get_year(p_cdda->cddb.disc) )
add_cddb_disc_info_val("Year (CDDB)", "%d", year);
add_cddb_disc_info_str("Artist (CDDB)", artist);
if ( CDDB_CAT_INVALID != cddb_disc_get_category(p_cdda->cddb.disc) )
add_info_str("Disc", "Category (CDDB)",
CDDB_CATEGORY[cddb_disc_get_category(p_cdda->cddb.disc)]);
add_cddb_disc_info_val("Disc ID (CDDB)", "%x", discid);
add_cddb_disc_info_str("Extended Data (CDDB)", ext_data);
add_cddb_disc_info_str("Genre (CDDB)", genre);
add_cddb_disc_info_str("Title (CDDB)", title);
if ( 0 != cddb_disc_get_year(p_cdda->cddb.disc) )
add_cddb_disc_info_val("Year (CDDB)", "%d", year);
}
#endif /*HAVE_LIBCDDB*/
if (p_cdda->p_cdtext[0])
{
char *psz_field;
char *psz_field;
add_cdtext_disc_info_str("Arranger (CD-Text)", CDTEXT_ARRANGER);
add_cdtext_disc_info_str("Composer (CD-Text)", CDTEXT_COMPOSER);
add_cdtext_disc_info_str("Disc ID (CD-Text)", CDTEXT_DISCID);
......@@ -369,74 +367,72 @@ CDDAMetaInfo( access_t *p_access, track_t i_track )
add_cdtext_disc_info_str("Songwriter (CD-Text)", CDTEXT_SONGWRITER);
add_cdtext_disc_info_str("Title (CD-Text)", CDTEXT_TITLE);
psz_field = p_cdda->p_cdtext[0]->field[CDTEXT_TITLE];
if (psz_field && strlen(psz_field)) {
psz_meta_title = psz_field;
}
psz_field = p_cdda->p_cdtext[0]->field[CDTEXT_PERFORMER];
if (psz_field && strlen(psz_field)) {
psz_meta_artist = psz_field;
}
psz_field = p_cdda->p_cdtext[0]->field[CDTEXT_TITLE];
if (psz_field && strlen(psz_field))
psz_meta_title = psz_field;
psz_field = p_cdda->p_cdtext[0]->field[CDTEXT_PERFORMER];
if (psz_field && strlen(psz_field))
psz_meta_artist = psz_field;
}
for( i = 0 ; i < p_cdda->i_tracks ; i++ )
{
char psz_track[TITLE_MAX];
const track_t i_track = i_first_track + i;
unsigned int i_track_frames =
cdio_get_track_lsn(p_cdda->p_cdio, i_track+1) -
cdio_get_track_lsn(p_cdda->p_cdio, i_track);
mtime_t i_duration = i_track_frames / CDIO_CD_FRAMES_PER_SEC;
char *psz_mrl = CDDAFormatMRL( p_access, i_track );
snprintf(psz_track, TITLE_MAX, "%s %02d", _("Track"), i_track);
input_Control( p_cdda->p_input, INPUT_ADD_INFO, psz_track,
_("Duration"), "%s",
secstotimestr( psz_buffer, i_duration ) );
input_Control( p_cdda->p_input, INPUT_ADD_INFO, psz_track,
_("MRL"), "%s", psz_mrl );
free(psz_mrl);
if (p_cdda->p_cdtext[i_track])
for( i = 0 ; i < p_cdda->i_tracks ; i++ )
{
add_cdtext_info_str( psz_track, "Arranger (CD-Text)",
i_track, CDTEXT_ARRANGER);
add_cdtext_info_str( psz_track, "Composer (CD-Text)",
i_track, CDTEXT_COMPOSER);
add_cdtext_info_str( psz_track, "Disc ID (CD-Text)",
i_track, CDTEXT_DISCID);
add_cdtext_info_str( psz_track, "Genre (CD-Text)",
i_track, CDTEXT_GENRE);
add_cdtext_info_str( psz_track, "Message (CD-Text)",
i_track, CDTEXT_MESSAGE);
add_cdtext_info_str( psz_track, "Performer (CD-Text)",
i_track, CDTEXT_PERFORMER);
add_cdtext_info_str( psz_track, "Songwriter (CD-Text)",
i_track, CDTEXT_SONGWRITER);
add_cdtext_info_str( psz_track, "Title (CD-Text)",
i_track, CDTEXT_TITLE);
}
char psz_track[TITLE_MAX];
const track_t i_track = i_first_track + i;
unsigned int i_track_frames =
cdio_get_track_lsn(p_cdda->p_cdio, i_track+1) -
cdio_get_track_lsn(p_cdda->p_cdio, i_track);
mtime_t i_duration = i_track_frames / CDIO_CD_FRAMES_PER_SEC;
char *psz_mrl = CDDAFormatMRL( p_access, i_track );
snprintf(psz_track, TITLE_MAX, "%s %02d", _("Track"), i_track);
input_Control( p_cdda->p_input, INPUT_ADD_INFO, psz_track,
_("Duration"), "%s",
secstotimestr( psz_buffer, i_duration ) );
input_Control( p_cdda->p_input, INPUT_ADD_INFO, psz_track,
_("MRL"), "%s", psz_mrl );
free(psz_mrl);
if (p_cdda->p_cdtext[i_track])
{
add_cdtext_info_str( psz_track, "Arranger (CD-Text)",
i_track, CDTEXT_ARRANGER);
add_cdtext_info_str( psz_track, "Composer (CD-Text)",
i_track, CDTEXT_COMPOSER);
add_cdtext_info_str( psz_track, "Disc ID (CD-Text)",
i_track, CDTEXT_DISCID);
add_cdtext_info_str( psz_track, "Genre (CD-Text)",
i_track, CDTEXT_GENRE);
add_cdtext_info_str( psz_track, "Message (CD-Text)",
i_track, CDTEXT_MESSAGE);
add_cdtext_info_str( psz_track, "Performer (CD-Text)",
i_track, CDTEXT_PERFORMER);
add_cdtext_info_str( psz_track, "Songwriter (CD-Text)",
i_track, CDTEXT_SONGWRITER);
add_cdtext_info_str( psz_track, "Title (CD-Text)",
i_track, CDTEXT_TITLE);
}
#ifdef HAVE_LIBCDDB
if (p_cdda->b_cddb_enabled)
{
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc, i);
if (t != NULL)
{
add_info_str(psz_track, "Artist (CDDB)",
cddb_track_get_artist(t));
add_info_str(psz_track, "Title (CDDB)",
cddb_track_get_title(t));
add_info_str(psz_track, "Extended Data (CDDB)",
cddb_track_get_ext_data(t));
}
}
if (p_cdda->b_cddb_enabled)
{
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc, i);
if (t != NULL)
{
add_info_str(psz_track, "Artist (CDDB)",
cddb_track_get_artist(t));
add_info_str(psz_track, "Title (CDDB)",
cddb_track_get_title(t));
add_info_str(psz_track, "Extended Data (CDDB)",
cddb_track_get_ext_data(t));
}
}
#endif /*HAVE_LIBCDDB*/
}
}
/* Above we should have set psz_meta_title and psz_meta_artist
to CDDB or CD-Text values or the default value depending on
......@@ -451,20 +447,19 @@ CDDAMetaInfo( access_t *p_access, track_t i_track )
different things. In either case, we may have customized to
put in the track name.
*/
if ( CDIO_INVALID_TRACK != i_track )
{
char *psz_name = CDDAFormatTitle( p_access, i_track ) ;
if ( !p_cdda->b_nav_mode ) {
add_meta_val( vlc_meta_Title, psz_name );
} else
if ( CDIO_INVALID_TRACK != i_track )
{
input_Control( p_cdda->p_input, INPUT_SET_NAME, psz_name );
free(psz_name);
char *psz_name = CDDAFormatTitle( p_access, i_track ) ;
if ( !p_cdda->b_nav_mode ) {
add_meta_val( vlc_meta_Title, psz_name );
} else
{
input_Control( p_cdda->p_input, INPUT_SET_NAME, psz_name );
free(psz_name);
}
if (psz_meta_artist)
add_meta_val( vlc_meta_Artist, psz_meta_artist );
}
if (psz_meta_artist)
add_meta_val( vlc_meta_Artist, psz_meta_artist );
}
}
}
......@@ -502,10 +497,10 @@ cdda_data_t *p_cdda, char *psz_cdtext)
/* We either don't have CD-Text info, or we do but we prefer to get CDDB
which means CDDB has been enabled and we were able to retrieve the info.*/
#ifdef HAVE_LIBCDDB
return !psz_cdtext ||
(!p_cdda->b_cdtext_prefer && p_cdda->b_cddb_enabled && p_cdda->cddb.disc);
return !psz_cdtext ||
(!p_cdda->b_cdtext_prefer && p_cdda->b_cddb_enabled && p_cdda->cddb.disc);
#else
return false;
return false;
#endif
}
......@@ -570,16 +565,16 @@ CDDAFormatStr( const access_t *p_access, cdda_data_t *p_cdda,
case 'a':
if (p_cdda->p_cdtext[0]
&& p_cdda->p_cdtext[0]->field[CDTEXT_PERFORMER])
psz = p_cdda->p_cdtext[0]->field[CDTEXT_PERFORMER];
psz = p_cdda->p_cdtext[0]->field[CDTEXT_PERFORMER];
if (want_cddb_info(p_cdda, psz))
psz = (char *)cddb_disc_get_artist(p_cdda->cddb.disc);
psz = (char *)cddb_disc_get_artist(p_cdda->cddb.disc);
goto format_str;
case 'A':
if (p_cdda->p_cdtext[0]
&& p_cdda->p_cdtext[0]->field[CDTEXT_TITLE])
psz = p_cdda->p_cdtext[0]->field[CDTEXT_TITLE];
if (want_cddb_info(p_cdda, psz))
psz = (char *)cddb_disc_get_title(p_cdda->cddb.disc);
psz = p_cdda->p_cdtext[0]->field[CDTEXT_TITLE];
if (want_cddb_info(p_cdda, psz))
psz = (char *)cddb_disc_get_title(p_cdda->cddb.disc);
goto format_str;
case 'C':
if (!p_cdda->b_cddb_enabled) goto not_special;
......@@ -589,18 +584,18 @@ CDDAFormatStr( const access_t *p_access, cdda_data_t *p_cdda,
case 'G':
if (p_cdda->p_cdtext[0]
&& p_cdda->p_cdtext[0]->field[CDTEXT_GENRE])
psz = p_cdda->p_cdtext[0]->field[CDTEXT_GENRE];
psz = p_cdda->p_cdtext[0]->field[CDTEXT_GENRE];
if (want_cddb_info(p_cdda, psz))
psz = (char *)cddb_disc_get_genre(p_cdda->cddb.disc);
psz = (char *)cddb_disc_get_genre(p_cdda->cddb.disc);
goto format_str;
case 'I':
if (p_cdda->p_cdtext[0]
&& p_cdda->p_cdtext[0]->field[CDTEXT_DISCID])
psz = p_cdda->p_cdtext[0]->field[CDTEXT_DISCID];
psz = p_cdda->p_cdtext[0]->field[CDTEXT_DISCID];
if (want_cddb_info(p_cdda, psz)) {
add_format_num_info(cddb_disc_get_discid(p_cdda->cddb.disc), "%x");
add_format_num_info(cddb_disc_get_discid(p_cdda->cddb.disc), "%x");
} else if (psz)
add_format_str_info(psz);
add_format_str_info(psz);
break;
case 'Y':
if (!p_cdda->b_cddb_enabled) goto not_special;
......@@ -619,132 +614,135 @@ CDDAFormatStr( const access_t *p_access, cdda_data_t *p_cdda,
} else {
add_format_str_info(psz_mrl);
}
} else {
if (p_cdda->p_cdtext[i_track]
&& p_cdda->p_cdtext[i_track]->field[CDTEXT_TITLE]) {
add_format_str_info(p_cdda->p_cdtext[i_track]->field[CDTEXT_TITLE]);
} else
add_format_str_info(psz_mrl);
}
}
else
{
if (p_cdda->p_cdtext[i_track]
&& p_cdda->p_cdtext[i_track]->field[CDTEXT_TITLE])
{
add_format_str_info(p_cdda->p_cdtext[i_track]->field[CDTEXT_TITLE]);
}
else
add_format_str_info(psz_mrl);
}
break;
case 'p':
if ( CDIO_INVALID_TRACK == i_track ) break;
if (p_cdda->p_cdtext[i_track]
&& p_cdda->p_cdtext[i_track]->field[CDTEXT_PERFORMER])
psz = p_cdda->p_cdtext[i_track]->field[CDTEXT_PERFORMER];
if (want_cddb_info(p_cdda, psz))
{
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc,
i_track-1);
if (t != NULL && cddb_track_get_artist(t) != NULL)
psz = (char *)cddb_track_get_artist(t);
}
goto format_str;
case 'e':
if ( CDIO_INVALID_TRACK == i_track ) break;
if (p_cdda->p_cdtext[i_track]
&& p_cdda->p_cdtext[i_track]->field[CDTEXT_MESSAGE])
psz = p_cdda->p_cdtext[i_track]->field[CDTEXT_MESSAGE];
if (want_cddb_info(p_cdda, psz))
case 'p':
if ( CDIO_INVALID_TRACK == i_track ) break;
if (p_cdda->p_cdtext[i_track]
&& p_cdda->p_cdtext[i_track]->field[CDTEXT_PERFORMER])
psz = p_cdda->p_cdtext[i_track]->field[CDTEXT_PERFORMER];
if (want_cddb_info(p_cdda, psz))
{
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc,
i_track-1);
if (t != NULL && cddb_track_get_ext_data(t) != NULL)
psz = (char *)cddb_track_get_ext_data(t);
i_track-1);
if (t != NULL && cddb_track_get_artist(t) != NULL)
psz = (char *)cddb_track_get_artist(t);
}
goto format_str;
goto format_str;
case 'e':
if ( CDIO_INVALID_TRACK == i_track ) break;
if (p_cdda->p_cdtext[i_track]
&& p_cdda->p_cdtext[i_track]->field[CDTEXT_MESSAGE])
psz = p_cdda->p_cdtext[i_track]->field[CDTEXT_MESSAGE];
if (want_cddb_info(p_cdda, psz))
{
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc,
i_track-1);
if (t != NULL && cddb_track_get_ext_data(t) != NULL)
psz = (char *)cddb_track_get_ext_data(t);
}
goto format_str;
break;
#else
case 'a':
if (p_cdda->p_cdtext[0]
&& p_cdda->p_cdtext[0]->field[CDTEXT_PERFORMER])
psz = p_cdda->p_cdtext[0]->field[CDTEXT_PERFORMER];
goto format_str;
if (p_cdda->p_cdtext[0]
&& p_cdda->p_cdtext[0]->field[CDTEXT_PERFORMER])
psz = p_cdda->p_cdtext[0]->field[CDTEXT_PERFORMER];
goto format_str;
case 'A':
if (p_cdda->p_cdtext[0]
&& p_cdda->p_cdtext[0]->field[CDTEXT_TITLE])
psz = p_cdda->p_cdtext[0]->field[CDTEXT_TITLE];
if (p_cdda->p_cdtext[0]
&& p_cdda->p_cdtext[0]->field[CDTEXT_TITLE])
psz = p_cdda->p_cdtext[0]->field[CDTEXT_TITLE];
goto format_str;
case 'G':
if (p_cdda->p_cdtext[0]
&& p_cdda->p_cdtext[0]->field[CDTEXT_GENRE])
psz = p_cdda->p_cdtext[0]->field[CDTEXT_GENRE];
goto format_str;
if (p_cdda->p_cdtext[0]
&& p_cdda->p_cdtext[0]->field[CDTEXT_GENRE])
psz = p_cdda->p_cdtext[0]->field[CDTEXT_GENRE];
goto format_str;
case 'I':
if (p_cdda->p_cdtext[0]
&& p_cdda->p_cdtext[0]->field[CDTEXT_DISCID])
add_format_str_info(p_cdda->p_cdtext[0]->field[CDTEXT_DISCID]);
if (p_cdda->p_cdtext[0]
&& p_cdda->p_cdtext[0]->field[CDTEXT_DISCID])
add_format_str_info(p_cdda->p_cdtext[0]->field[CDTEXT_DISCID]);
break;
case 'p':
if ( CDIO_INVALID_TRACK == i_track ) break;
if (p_cdda->p_cdtext[i_track]
&& p_cdda->p_cdtext[i_track]->field[CDTEXT_PERFORMER])
psz = p_cdda->p_cdtext[i_track]->field[CDTEXT_PERFORMER];
goto format_str;
case 'p':
if ( CDIO_INVALID_TRACK == i_track ) break;
if (p_cdda->p_cdtext[i_track]
&& p_cdda->p_cdtext[i_track]->field[CDTEXT_PERFORMER])
psz = p_cdda->p_cdtext[i_track]->field[CDTEXT_PERFORMER];
goto format_str;
case 't':
if ( CDIO_INVALID_TRACK == i_track ) break;
if (p_cdda->p_cdtext[i_track]
&& p_cdda->p_cdtext[i_track]->field[CDTEXT_TITLE])
psz = p_cdda->p_cdtext[i_track]->field[CDTEXT_TITLE];
else
psz = psz_mrl;
if ( CDIO_INVALID_TRACK == i_track ) break;
if (p_cdda->p_cdtext[i_track]
&& p_cdda->p_cdtext[i_track]->field[CDTEXT_TITLE])
psz = p_cdda->p_cdtext[i_track]->field[CDTEXT_TITLE];
else
psz = psz_mrl;
goto format_str;
case 'e':
if ( CDIO_INVALID_TRACK == i_track ) break;
if (p_cdda->p_cdtext[i_track]
&& p_cdda->p_cdtext[i_track]->field[CDTEXT_MESSAGE])
psz = p_cdda->p_cdtext[i_track]->field[CDTEXT_MESSAGE];
goto format_str;
if ( CDIO_INVALID_TRACK == i_track ) break;
if (p_cdda->p_cdtext[i_track]
&& p_cdda->p_cdtext[i_track]->field[CDTEXT_MESSAGE])
psz = p_cdda->p_cdtext[i_track]->field[CDTEXT_MESSAGE];
goto format_str;
break;
#endif /*HAVE_LIBCDDB*/
case 's':
if ( CDIO_INVALID_TRACK != i_track )
if ( CDIO_INVALID_TRACK != i_track )
{
char psz_buffer[MSTRTIME_MAX_SIZE];
unsigned int i_track_frames =
cdio_get_track_sec_count(p_cdda->p_cdio, i_track);
unsigned int i_track_frames =
cdio_get_track_sec_count(p_cdda->p_cdio, i_track);
mtime_t i_duration =
i_track_frames / CDIO_CD_FRAMES_PER_SEC;
i_track_frames / CDIO_CD_FRAMES_PER_SEC;
add_format_str_info( secstotimestr( psz_buffer,
i_duration ) );
break;
break;
}
/* Fall through to disc duration if CDIO_INVALID_TRACK */
/* Fall through to disc duration if CDIO_INVALID_TRACK */
case 'S':
{
char psz_buffer[MSTRTIME_MAX_SIZE];
unsigned int i_track_frames =
cdio_get_track_lba(p_cdda->p_cdio,
CDIO_CDROM_LEADOUT_TRACK);
unsigned int i_track_frames =
cdio_get_track_lba(p_cdda->p_cdio,
CDIO_CDROM_LEADOUT_TRACK);
mtime_t i_duration =
i_track_frames / CDIO_CD_FRAMES_PER_SEC;
i_track_frames / CDIO_CD_FRAMES_PER_SEC;
add_format_str_info( secstotimestr( psz_buffer,
i_duration ) );
break;
break;
}
case 'M':
add_format_str_info(psz_mrl);
break;
add_format_str_info(psz_mrl);
break;
case 'm':
add_format_str_info(p_cdda->psz_mcn);
break;
add_format_str_info(p_cdda->psz_mcn);
break;
case 'n':