diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-02-27 20:49:08 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-02-27 20:49:08 +0000 |
commit | 41658bd07a1bc7b48ef12b356f67f11225593ddd (patch) | |
tree | adc3d80e944a0c541c9ed483df4f1f528bdab5e1 /apps/mp3data.c | |
parent | 883ff8507e42f7fbba6416e60fb116164219aa5f (diff) | |
download | rockbox-41658bd07a1bc7b48ef12b356f67f11225593ddd.tar.gz rockbox-41658bd07a1bc7b48ef12b356f67f11225593ddd.zip |
Remove some useless code and variables in the area of metadata parsing. Bump codec API.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29438 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/mp3data.c')
-rw-r--r-- | apps/mp3data.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/apps/mp3data.c b/apps/mp3data.c index 44208604bc..f5ef122801 100644 --- a/apps/mp3data.c +++ b/apps/mp3data.c | |||
@@ -142,8 +142,10 @@ static bool mp3headerinfo(struct mp3info *info, unsigned long header) | |||
142 | if (info->layer == 3) | 142 | if (info->layer == 3) |
143 | return false; | 143 | return false; |
144 | 144 | ||
145 | /* Rockbox: not used | ||
145 | info->protection = (header & PROTECTION_MASK) ? true : false; | 146 | info->protection = (header & PROTECTION_MASK) ? true : false; |
146 | 147 | */ | |
148 | |||
147 | /* Bitrate */ | 149 | /* Bitrate */ |
148 | bitindex = (header & BITRATE_MASK) >> 12; | 150 | bitindex = (header & BITRATE_MASK) >> 12; |
149 | info->bitrate = bitrate_table[info->version][info->layer][bitindex]; | 151 | info->bitrate = bitrate_table[info->version][info->layer][bitindex]; |
@@ -187,14 +189,15 @@ static bool mp3headerinfo(struct mp3info *info, unsigned long header) | |||
187 | info->ft_num = 1000 * info->ft_den * info->frame_samples / info->frequency; | 189 | info->ft_num = 1000 * info->ft_den * info->frame_samples / info->frequency; |
188 | 190 | ||
189 | info->channel_mode = (header & CHANNELMODE_MASK) >> 6; | 191 | info->channel_mode = (header & CHANNELMODE_MASK) >> 6; |
192 | /* Rockbox: not used | ||
190 | info->mode_extension = (header & MODE_EXT_MASK) >> 4; | 193 | info->mode_extension = (header & MODE_EXT_MASK) >> 4; |
191 | info->emphasis = header & EMPHASIS_MASK; | 194 | info->emphasis = header & EMPHASIS_MASK; |
192 | 195 | */ | |
193 | VDEBUGF( "Header: %08lx, Ver %d, lay %d, bitr %d, freq %ld, " | 196 | VDEBUGF( "Header: %08lx, Ver %d, lay %d, bitr %d, freq %ld, " |
194 | "chmode %d, mode_ext %d, emph %d, bytes: %d time: %d/%d\n", | 197 | "chmode %d, bytes: %d time: %d/%d\n", |
195 | header, info->version, info->layer+1, info->bitrate, | 198 | header, info->version, info->layer+1, info->bitrate, |
196 | info->frequency, info->channel_mode, info->mode_extension, | 199 | info->frequency, info->channel_mode, |
197 | info->emphasis, info->frame_size, info->ft_num, info->ft_den); | 200 | info->frame_size, info->ft_num, info->ft_den); |
198 | return true; | 201 | return true; |
199 | } | 202 | } |
200 | 203 | ||
@@ -405,8 +408,9 @@ int get_mp3file_info(int fd, struct mp3info *info) | |||
405 | /* DEBUGF("Xing/Info header\n"); */ | 408 | /* DEBUGF("Xing/Info header\n"); */ |
406 | 409 | ||
407 | /* Remember where in the file the Xing header is */ | 410 | /* Remember where in the file the Xing header is */ |
411 | /* Rockbox: not used | ||
408 | info->vbr_header_pos = lseek(fd, 0, SEEK_CUR) - info->frame_size; | 412 | info->vbr_header_pos = lseek(fd, 0, SEEK_CUR) - info->frame_size; |
409 | 413 | */ | |
410 | /* We want to skip the Xing frame when playing the stream */ | 414 | /* We want to skip the Xing frame when playing the stream */ |
411 | bytecount += info->frame_size; | 415 | bytecount += info->frame_size; |
412 | 416 | ||
@@ -420,7 +424,10 @@ int get_mp3file_info(int fd, struct mp3info *info) | |||
420 | return -5; | 424 | return -5; |
421 | 425 | ||
422 | /* Is it a VBR file? */ | 426 | /* Is it a VBR file? */ |
423 | info->is_vbr = info->is_xing_vbr = !memcmp(vbrheader, "Xing", 4); | 427 | info->is_vbr = !memcmp(vbrheader, "Xing", 4); |
428 | /* Rockbox: not used | ||
429 | info->is_xing_vbr = info->is_vbr; | ||
430 | */ | ||
424 | 431 | ||
425 | if (vbrheader[7] & VBR_FRAMES_FLAG) /* Is the frame count there? */ | 432 | if (vbrheader[7] & VBR_FRAMES_FLAG) /* Is the frame count there? */ |
426 | { | 433 | { |
@@ -506,7 +513,9 @@ int get_mp3file_info(int fd, struct mp3info *info) | |||
506 | 513 | ||
507 | /* Yes, it is a FhG VBR file */ | 514 | /* Yes, it is a FhG VBR file */ |
508 | info->is_vbr = true; | 515 | info->is_vbr = true; |
516 | /* Rockbox: not used | ||
509 | info->is_vbri_vbr = true; | 517 | info->is_vbri_vbr = true; |
518 | */ | ||
510 | info->has_toc = false; /* We don't parse the TOC (yet) */ | 519 | info->has_toc = false; /* We don't parse the TOC (yet) */ |
511 | 520 | ||
512 | info->byte_count = bytes2int(vbrheader[10], vbrheader[11], | 521 | info->byte_count = bytes2int(vbrheader[10], vbrheader[11], |