summaryrefslogtreecommitdiff
path: root/apps/mp3data.c
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-02-27 20:49:08 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-02-27 20:49:08 +0000
commit41658bd07a1bc7b48ef12b356f67f11225593ddd (patch)
treeadc3d80e944a0c541c9ed483df4f1f528bdab5e1 /apps/mp3data.c
parent883ff8507e42f7fbba6416e60fb116164219aa5f (diff)
downloadrockbox-41658bd07a1bc7b48ef12b356f67f11225593ddd.zip
rockbox-41658bd07a1bc7b48ef12b356f67f11225593ddd.tar.gz
rockbox-41658bd07a1bc7b48ef12b356f67f11225593ddd.tar.bz2
rockbox-41658bd07a1bc7b48ef12b356f67f11225593ddd.tar.xz
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.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/apps/mp3data.c b/apps/mp3data.c
index 4420860..f5ef122 100644
--- a/apps/mp3data.c
+++ b/apps/mp3data.c
@@ -142,8 +142,10 @@ static bool mp3headerinfo(struct mp3info *info, unsigned long header)
if (info->layer == 3)
return false;
+/* Rockbox: not used
info->protection = (header & PROTECTION_MASK) ? true : false;
-
+*/
+
/* Bitrate */
bitindex = (header & BITRATE_MASK) >> 12;
info->bitrate = bitrate_table[info->version][info->layer][bitindex];
@@ -187,14 +189,15 @@ static bool mp3headerinfo(struct mp3info *info, unsigned long header)
info->ft_num = 1000 * info->ft_den * info->frame_samples / info->frequency;
info->channel_mode = (header & CHANNELMODE_MASK) >> 6;
+/* Rockbox: not used
info->mode_extension = (header & MODE_EXT_MASK) >> 4;
info->emphasis = header & EMPHASIS_MASK;
-
+*/
VDEBUGF( "Header: %08lx, Ver %d, lay %d, bitr %d, freq %ld, "
- "chmode %d, mode_ext %d, emph %d, bytes: %d time: %d/%d\n",
+ "chmode %d, bytes: %d time: %d/%d\n",
header, info->version, info->layer+1, info->bitrate,
- info->frequency, info->channel_mode, info->mode_extension,
- info->emphasis, info->frame_size, info->ft_num, info->ft_den);
+ info->frequency, info->channel_mode,
+ info->frame_size, info->ft_num, info->ft_den);
return true;
}
@@ -405,8 +408,9 @@ int get_mp3file_info(int fd, struct mp3info *info)
/* DEBUGF("Xing/Info header\n"); */
/* Remember where in the file the Xing header is */
+/* Rockbox: not used
info->vbr_header_pos = lseek(fd, 0, SEEK_CUR) - info->frame_size;
-
+*/
/* We want to skip the Xing frame when playing the stream */
bytecount += info->frame_size;
@@ -420,7 +424,10 @@ int get_mp3file_info(int fd, struct mp3info *info)
return -5;
/* Is it a VBR file? */
- info->is_vbr = info->is_xing_vbr = !memcmp(vbrheader, "Xing", 4);
+ info->is_vbr = !memcmp(vbrheader, "Xing", 4);
+/* Rockbox: not used
+ info->is_xing_vbr = info->is_vbr;
+*/
if (vbrheader[7] & VBR_FRAMES_FLAG) /* Is the frame count there? */
{
@@ -506,7 +513,9 @@ int get_mp3file_info(int fd, struct mp3info *info)
/* Yes, it is a FhG VBR file */
info->is_vbr = true;
+/* Rockbox: not used
info->is_vbri_vbr = true;
+*/
info->has_toc = false; /* We don't parse the TOC (yet) */
info->byte_count = bytes2int(vbrheader[10], vbrheader[11],