pkgsrc/multimedia/vlc/patches/patch-ab

202 lines
9.4 KiB
Text

$NetBSD: patch-ab,v 1.1 2005/11/11 23:39:35 wiz Exp $
--- modules/access/cdda/access.c.orig 2005-11-11 20:18:27.000000000 +0100
+++ modules/access/cdda/access.c
@@ -360,36 +360,36 @@ static void InformationCreate( input_thr
if (p_cdda->i_cddb_enabled) {
dbg_print( INPUT_DBG_META, "field %s: %s\n", "Title",
- p_cdda->cddb.disc->title );
+ cddb_disc_get_title(p_cdda->cddb.disc) );
input_Control( p_input, INPUT_ADD_INFO, _("General"), _("Title"),
- "%s", p_cdda->cddb.disc->title );
+ "%s", cddb_disc_get_title(p_cdda->cddb.disc));
dbg_print( INPUT_DBG_META, "field %s: %s\n", "Artist",
- p_cdda->cddb.disc->artist );
+ cddb_disc_get_artist(p_cdda->cddb.disc));
input_Control( p_input, INPUT_ADD_INFO, _("General"), _("Artist"),
- "%s", p_cdda->cddb.disc->artist );
+ "%s", cddb_disc_get_artist(p_cdda->cddb.disc));
dbg_print( INPUT_DBG_META, "field %s: %s\n", "Genre",
- p_cdda->cddb.disc->genre );
+ cddb_disc_get_genre(p_cdda->cddb.disc));
input_Control( p_input, INPUT_ADD_INFO, _("General"), _("Genre"),
- "%s", p_cdda->cddb.disc->genre );
+ "%s", cddb_disc_get_genre(p_cdda->cddb.disc));
dbg_print( INPUT_DBG_META, "field %s: %s\n", "Extended Data",
- p_cdda->cddb.disc->ext_data );
+ cddb_disc_get_ext_data(p_cdda->cddb.disc));
input_Control( p_input, INPUT_ADD_INFO, _("General"), _("Extended Data"),
- "%s", p_cdda->cddb.disc->ext_data );
+ "%s", cddb_disc_get_ext_data(p_cdda->cddb.disc));
- if (p_cdda->cddb.disc->year != 0)
+ if (cddb_disc_get_year(p_cdda->cddb.disc))
input_Control( p_input, INPUT_ADD_INFO, _("General"),
- _("Year"), "%d", p_cdda->cddb.disc->year );
- if ( p_cdda->cddb.disc->discid )
+ _("Year"), "%d", cddb_disc_get_year(p_cdda->cddb.disc));
+ if ( cddb_disc_get_discid(p_cdda->cddb.disc))
input_Control( p_input, INPUT_ADD_INFO, _("General"),
- _("CDDB Disc ID"), "%x", p_cdda->cddb.disc->discid );
+ _("CDDB Disc ID"), "%x", cddb_disc_get_discid(p_cdda->cddb.disc));
- if ( p_cdda->cddb.disc->category != CDDB_CAT_INVALID )
+ if ( cddb_disc_get_category(p_cdda->cddb.disc) != CDDB_CAT_INVALID )
input_Control( p_input, INPUT_ADD_INFO, _("General"),
_("CDDB Disc Category"), "%s",
- CDDB_CATEGORY[p_cdda->cddb.disc->category] );
+ CDDB_CATEGORY[cddb_disc_get_category(p_cdda->cddb.disc)] );
}
#endif /*HAVE_LIBCDDB*/
@@ -420,17 +420,17 @@ static void InformationCreate( input_thr
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc,
i_track);
if (t != NULL) {
- if ( t->artist != NULL && strlen(t->artist) ) {
+ if ( cddb_track_get_artist(t) != NULL && strlen(cddb_track_get_artist(t)) ) {
input_Control( p_input, INPUT_ADD_INFO, track_str,
- _("Artist"), "%s", t->artist );
+ _("Artist"), "%s", cddb_track_get_artist(t));
}
- if ( t->title != NULL && strlen(t->title) ) {
+ if ( cddb_track_get_title(t) != NULL && strlen(cddb_track_get_title(t)) ) {
input_Control( p_input, INPUT_ADD_INFO, track_str,
- _("Title"), "%s", t->title );
+ _("Title"), "%s", cddb_track_get_title(t));
}
- if ( t->ext_data != NULL && strlen(t->ext_data) ) {
+ if ( cddb_track_get_ext_data(t) != NULL && cddb_track_get_ext_data(t) ) {
input_Control( p_input, INPUT_ADD_INFO, track_str,
- _("Extended Data"), "%s", t->ext_data );
+ _("Extended Data"), "%s", cddb_track_get_ext_data(t));
}
}
}
@@ -505,13 +505,13 @@ GetCDDBInfo( const input_thread_t *p_inp
for(i = 1; i <= p_cdda->i_nb_tracks; i++) {
cddb_track_t *t = cddb_track_new();
- t->frame_offset = cdio_get_track_lba(cdio, i);
+ cddb_track_set_frame_offset(t, cdio_get_track_lba(cdio, i));
cddb_disc_add_track(p_cdda->cddb.disc, t);
}
- p_cdda->cddb.disc->length =
+ cddb_disc_set_length(p_cdda->cddb.disc,
cdio_get_track_lba(cdio, CDIO_CDROM_LEADOUT_TRACK)
- / CDIO_CD_FRAMES_PER_SEC;
+ / CDIO_CD_FRAMES_PER_SEC);
if (!cddb_disc_calc_discid(p_cdda->cddb.disc)) {
msg_Err( p_input, "CDDB disc calc failed" );
@@ -618,50 +618,50 @@ CDDAFormatStr(const input_thread_t *p_in
#ifdef HAVE_LIBCDDB
case 'a':
if (!p_cdda->i_cddb_enabled) goto not_special;
- add_format_str_info(p_cdda->cddb.disc->artist);
+ add_format_str_info(cddb_disc_get_artist(p_cdda->cddb.disc));
break;
case 'A':
if (!p_cdda->i_cddb_enabled) goto not_special;
- add_format_str_info(p_cdda->cddb.disc->title);
+ add_format_str_info(cddb_disc_get_title(p_cdda->cddb.disc));
break;
case 'C':
if (!p_cdda->i_cddb_enabled) goto not_special;
- add_format_str_info(CDDB_CATEGORY[p_cdda->cddb.disc->category]);
+ add_format_str_info(CDDB_CATEGORY[cddb_disc_get_category(p_cdda->cddb.disc)]);
break;
case 'G':
if (!p_cdda->i_cddb_enabled) goto not_special;
- add_format_str_info(p_cdda->cddb.disc->genre);
+ add_format_str_info(cddb_disc_get_genre(p_cdda->cddb.disc));
break;
case 'I':
if (!p_cdda->i_cddb_enabled) goto not_special;
- add_format_num_info(p_cdda->cddb.disc->discid, "%x");
+ add_format_num_info(cddb_disc_get_discid(p_cdda->cddb.disc), "%x");
break;
case 'Y':
if (!p_cdda->i_cddb_enabled) goto not_special;
- add_format_num_info(p_cdda->cddb.disc->year, "%5d");
+ add_format_num_info(cddb_disc_get_year(p_cdda->cddb.disc), "%5d");
break;
case 't':
if (p_cdda->i_cddb_enabled) {
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc,
i_track-1);
- if (t != NULL && t->title != NULL)
- add_format_str_info(t->title);
+ if (t != NULL && cddb_track_get_title(t) != NULL)
+ add_format_str_info(cddb_track_get_title(t));
} else goto not_special;
break;
case 'p':
if (p_cdda->i_cddb_enabled) {
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc,
i_track-1);
- if (t != NULL && t->artist != NULL)
- add_format_str_info(t->artist);
+ if (t != NULL && cddb_track_get_artist(t) != NULL)
+ add_format_str_info(cddb_track_get_artist(t));
} else goto not_special;
break;
case 'e':
if (p_cdda->i_cddb_enabled) {
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc,
i_track-1);
- if (t != NULL && t->ext_data != NULL)
- add_format_str_info(t->ext_data);
+ if (t != NULL && cddb_track_get_ext_data(t) != NULL)
+ add_format_str_info(cddb_track_get_ext_data(t));
} else goto not_special;
break;
#endif
@@ -762,31 +762,31 @@ CDDACreatePlayListItem(const input_threa
const char *psz_general_cat = _("General");
playlist_ItemAddInfo( p_item, psz_general_cat, _("Album"),
- "%s", p_cdda->cddb.disc->title);
+ "%s", cddb_disc_get_title(p_cdda->cddb.disc));
playlist_ItemAddInfo( p_item, psz_general_cat, _("Disc Artist(s)"),
- "%s", p_cdda->cddb.disc->artist);
+ "%s", cddb_disc_get_artist(p_cdda->cddb.disc));
playlist_ItemAddInfo( p_item, psz_general_cat,
_("CDDB Disc Category"),
- "%s", CDDB_CATEGORY[p_cdda->cddb.disc->category]);
+ "%s", CDDB_CATEGORY[cddb_disc_get_category(p_cdda->cddb.disc)]);
playlist_ItemAddInfo( p_item, psz_general_cat, _("Genre"),
- "%s", p_cdda->cddb.disc->genre);
- if ( p_cdda->cddb.disc->discid ) {
+ "%s", cddb_disc_get_genre(p_cdda->cddb.disc));
+ if ( cddb_disc_get_discid(p_cdda->cddb.disc) ) {
playlist_ItemAddInfo( p_item, psz_general_cat, _("CDDB Disc ID"),
- "%x", p_cdda->cddb.disc->discid );
+ "%x", cddb_disc_get_discid(p_cdda->cddb.disc));
}
- if (p_cdda->cddb.disc->year != 0) {
+ if (cddb_disc_get_year(p_cdda->cddb.disc) != 0) {
playlist_ItemAddInfo( p_item, psz_general_cat,
- _("Year"), "%5d", p_cdda->cddb.disc->year );
+ _("Year"), "%5d", cddb_disc_get_year(p_cdda->cddb.disc) );
}
if (p_cdda->i_cddb_enabled) {
cddb_track_t *t=cddb_disc_get_track(p_cdda->cddb.disc,
i_track-1);
- if (t != NULL && t->artist != NULL) {
+ if (t != NULL && cddb_track_get_artist(t) != NULL) {
playlist_ItemAddInfo( p_item, psz_general_cat,
- _("Track Artist"), "%s", t->artist );
+ _("Track Artist"), "%s", cddb_track_get_artist(t));
playlist_ItemAddInfo( p_item , psz_general_cat,
- _("Track Title"), "%s", t->title );
+ _("Track Title"), "%s", cddb_track_get_title(t));
}
}