summaryrefslogtreecommitdiff
path: root/firmware/export/id3.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/id3.h')
-rw-r--r--firmware/export/id3.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/firmware/export/id3.h b/firmware/export/id3.h
new file mode 100644
index 0000000000..55ce002c2e
--- /dev/null
+++ b/firmware/export/id3.h
@@ -0,0 +1,76 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Daniel Stenberg
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef ID3_H
20#define ID3_H
21
22#include "file.h"
23
24struct mp3entry {
25 char path[MAX_PATH];
26 char *title;
27 char *artist;
28 char *album;
29 int tracknum;
30 int version;
31 int layer;
32 int year;
33 unsigned char id3version;
34 unsigned char genre;
35 unsigned int bitrate;
36 unsigned int frequency;
37 unsigned int id3v2len;
38 unsigned int id3v1len;
39 unsigned int first_frame_offset; /* Byte offset to first real MP3 frame.
40 Used for skipping leading garbage to
41 avoid gaps between tracks. */
42 unsigned int filesize; /* in bytes */
43 unsigned int length; /* song length */
44 unsigned int elapsed; /* ms played */
45 long bpf; /* bytes per frame */
46 long tpf; /* time per frame */
47
48 /* Xing VBR fields */
49 bool vbr;
50 unsigned char vbrflags;
51 unsigned char toc[100];/* table of contents */
52
53 /* these following two fields are used for local buffering */
54 char id3v2buf[300];
55 char id3v1buf[3][32];
56
57 /* resume related */
58 int offset; /* bytes played */
59 int index; /* playlist index */
60};
61
62#define VBR_FRAMES_FLAG 0x01
63#define VBR_BYTES_FLAG 0x02
64#define VBR_TOC_FLAG 0x04
65
66enum {
67 ID3_VER_1_0 = 1,
68 ID3_VER_1_1,
69 ID3_VER_2_2,
70 ID3_VER_2_3,
71 ID3_VER_2_4
72};
73
74bool mp3info(struct mp3entry *entry, char *filename);
75
76#endif