Fixed red build
[kugel-rb.git] / firmware / id3.h
blob88f50ba9b1b4323b67e9a229db3be3acfb9ae9fd
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Daniel Stenberg
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.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #ifndef ID3_H
20 #define ID3_H
22 #include "file.h"
24 struct 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 unsigned int bitrate;
33 unsigned int frequency;
34 unsigned int id3v2len;
35 unsigned int id3v1len;
36 unsigned int first_frame_offset; /* Byte offset to first real MP3 frame.
37 Used for skipping leading garbage to
38 avoid gaps between tracks. */
39 unsigned int filesize; /* in bytes */
40 unsigned int length; /* song length */
41 unsigned int elapsed; /* ms played */
42 long bpf; /* bytes per frame */
43 long tpf; /* time per frame */
45 /* Xing VBR fields */
46 bool vbr;
47 unsigned char vbrflags;
48 unsigned char toc[100];/* table of contents */
50 /* these following two fields are used for local buffering */
51 char id3v2buf[300];
52 char id3v1buf[3][32];
54 /* resume related */
55 int offset; /* bytes played */
56 int index; /* playlist index */
59 #define VBR_FRAMES_FLAG 0x01
60 #define VBR_BYTES_FLAG 0x02
61 #define VBR_TOC_FLAG 0x04
63 bool mp3info(struct mp3entry *entry, char *filename);
65 #endif