summaryrefslogtreecommitdiff
path: root/apps/metadata/metadata_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/metadata/metadata_common.h')
-rw-r--r--apps/metadata/metadata_common.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/apps/metadata/metadata_common.h b/apps/metadata/metadata_common.h
new file mode 100644
index 0000000000..70e708010d
--- /dev/null
+++ b/apps/metadata/metadata_common.h
@@ -0,0 +1,45 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2005 Dave Chapman
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#include "id3.h"
20
21#ifdef ROCKBOX_BIG_ENDIAN
22#define IS_BIG_ENDIAN 1
23#else
24#define IS_BIG_ENDIAN 0
25#endif
26
27#define TAG_NAME_LENGTH 32
28#define TAG_VALUE_LENGTH 128
29
30enum tagtype { TAGTYPE_APE = 1, TAGTYPE_VORBIS };
31
32bool read_ape_tags(int fd, struct mp3entry* id3);
33bool read_vorbis_tags(int fd, struct mp3entry *id3,
34 long tag_remaining);
35
36bool skip_id3v2(int fd, struct mp3entry *id3);
37long read_string(int fd, char* buf, long buf_size, int eos, long size);
38int read_uint32be(int fd, unsigned int* buf);
39unsigned long get_long_le(void* buf);
40unsigned short get_short_le(void* buf);
41unsigned long get_long_be(void* buf);
42long get_slong(void* buf);
43unsigned long get_itunes_int32(char* value, int count);
44long parse_tag(const char* name, char* value, struct mp3entry* id3,
45 char* buf, long buf_remaining, enum tagtype type);