Rename 'mp3entry.embed_cuesheet' to 'mp3entry.embedded_cuesheet' and pull out a field (FS#12473)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31406 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Alexander Levin 2011-12-22 18:56:11 +00:00
parent 63c4ef9f57
commit 7f7a2d3b13
5 changed files with 16 additions and 15 deletions

View file

@ -49,11 +49,11 @@ bool look_for_cuesheet_file(struct mp3entry *track_id3, struct cuesheet_file *cu
char cuepath[MAX_PATH]; char cuepath[MAX_PATH];
char *dot, *slash; char *dot, *slash;
if (track_id3->embed_cuesheet.present) if (track_id3->has_embedded_cuesheet)
{ {
cue_file->pos = track_id3->embed_cuesheet.pos; cue_file->pos = track_id3->embedded_cuesheet.pos;
cue_file->size = track_id3->embed_cuesheet.size; cue_file->size = track_id3->embedded_cuesheet.size;
cue_file->encoding = track_id3->embed_cuesheet.encoding; cue_file->encoding = track_id3->embedded_cuesheet.encoding;
strlcpy(cue_file->path, track_id3->path, MAX_PATH); strlcpy(cue_file->path, track_id3->path, MAX_PATH);
return true; return true;
} }

View file

@ -439,8 +439,8 @@ bool get_metadata(struct mp3entry* id3, int fd, const char* trackname)
id3->codectype = probe_file_format(trackname); id3->codectype = probe_file_format(trackname);
/* default values for embedded cuesheets */ /* default values for embedded cuesheets */
id3->embed_cuesheet.present = false; id3->has_embedded_cuesheet = false;
id3->embed_cuesheet.pos = 0; id3->embedded_cuesheet.pos = 0;
entry = &audio_formats[id3->codectype]; entry = &audio_formats[id3->codectype];

View file

@ -322,7 +322,8 @@ struct mp3entry {
#endif #endif
/* Cuesheet support */ /* Cuesheet support */
struct embedded_cuesheet embed_cuesheet; bool has_embedded_cuesheet;
struct embedded_cuesheet embedded_cuesheet;
struct cuesheet *cuesheet; struct cuesheet *cuesheet;
/* Musicbrainz Track ID */ /* Musicbrainz Track ID */

View file

@ -1029,12 +1029,12 @@ void setid3v2title(int fd, struct mp3entry *entry)
break; break;
} }
if (char_enc > 0) { if (char_enc > 0) {
entry->embed_cuesheet.present = true; entry->has_embedded_cuesheet = true;
entry->embed_cuesheet.pos = lseek(fd, 0, SEEK_CUR) entry->embedded_cuesheet.pos = lseek(fd, 0, SEEK_CUR)
- framelen + cuesheet_offset; - framelen + cuesheet_offset;
entry->embed_cuesheet.size = totframelen entry->embedded_cuesheet.size = totframelen
- cuesheet_offset; - cuesheet_offset;
entry->embed_cuesheet.encoding = char_enc; entry->embedded_cuesheet.encoding = char_enc;
} }
break; break;
} }

View file

@ -353,10 +353,10 @@ long read_vorbis_tags(int fd, struct mp3entry *id3,
/* Is it an embedded cuesheet? */ /* Is it an embedded cuesheet? */
if (!strcasecmp(name, "CUESHEET")) if (!strcasecmp(name, "CUESHEET"))
{ {
id3->embed_cuesheet.present = true; id3->has_embedded_cuesheet = true;
id3->embed_cuesheet.pos = lseek(file.fd, 0, SEEK_CUR) - read_len; id3->embedded_cuesheet.pos = lseek(file.fd, 0, SEEK_CUR) - read_len;
id3->embed_cuesheet.size = len; id3->embedded_cuesheet.size = len;
id3->embed_cuesheet.encoding = CHAR_ENC_UTF_8; id3->embedded_cuesheet.encoding = CHAR_ENC_UTF_8;
} }
else else
{ {