Go to the documentation of this file.
33 #define ID3V22_TAG ME_FOURCC('I', 'D', '3', 2)
34 #define ID3V23_TAG ME_FOURCC('I', 'D', '3', 3)
35 #define ID3V24_TAG ME_FOURCC('I', 'D', '3', 4)
36 #define ID3V24_FOOTER_TAG ME_FOURCC('3', 'D', 'I', 0)
38 #define ID3V2X_TAG ME_FOURCC('I', 'D', '3', 0)
39 #define ID3V2X_MASK ~ME_FOURCC( 0 , 0 , 0 , 0xFF)
45 #define ID3V22_UNSYNCH_FLAG 0x80
46 #define ID3V22_COMPRESS_FLAG 0x40
47 #define ID3V22_ZERO_FLAG 0x3F
50 #define ID3V22_FRAME_HEADER_SIZE 6
56 #define ID3V23_UNSYNCH_FLAG 0x80
57 #define ID3V23_EXT_HEADER_FLAG 0x40
58 #define ID3V23_EXPERIMENTAL_FLAG 0x20
59 #define ID3V23_ZERO_FLAG 0x1F
62 #define ID3V23_FRAME_HEADER_SIZE 10
63 #define ID3V23_FRAME_TAG_PRESERV_FLAG 0x8000
64 #define ID3V23_FRAME_FILE_PRESERV_FLAG 0x4000
65 #define ID3V23_FRAME_READ_ONLY_FLAG 0x2000
66 #define ID3V23_FRAME_COMPRESS_FLAG 0x0080
67 #define ID3V23_FRAME_ENCRYPT_FLAG 0x0040
68 #define ID3V23_FRAME_GROUP_ID_FLAG 0x0020
69 #define ID3V23_FRAME_ZERO_FLAG 0x1F1F
75 #define ID3V24_UNSYNCH_FLAG 0x80
76 #define ID3V24_EXT_HEADER_FLAG 0x40
77 #define ID3V24_EXPERIMENTAL_FLAG 0x20
78 #define ID3V24_FOOTER_FLAG 0x10
79 #define ID3V24_ZERO_FLAG 0x0F
82 #define ID3V24_EXT_UPDATE_FLAG 0x40
83 #define ID3V24_EXT_CRC_FLAG 0x20
84 #define ID3V24_EXT_RESTRICTIONS_FLAG 0x10
85 #define ID3V24_EXT_ZERO_FLAG 0x8F
88 #define ID3V24_FRAME_HEADER_SIZE 10
89 #define ID3V24_FRAME_TAG_PRESERV_FLAG 0x4000
90 #define ID3V24_FRAME_FILE_PRESERV_FLAG 0x2000
91 #define ID3V24_FRAME_READ_ONLY_FLAG 0x1000
92 #define ID3V24_FRAME_GROUP_ID_FLAG 0x0040
93 #define ID3V24_FRAME_COMPRESS_FLAG 0x0008
94 #define ID3V24_FRAME_ENCRYPT_FLAG 0x0004
95 #define ID3V24_FRAME_UNSYNCH_FLAG 0x0002
96 #define ID3V24_FRAME_DATA_LEN_FLAG 0x0001
97 #define ID3V24_FRAME_ZERO_FLAG 0x8FB0
100 #define ID3V24_FOOTER_SIZE 10
167 uint32_t id3_signature);
179 static inline uint16_t _X_BE_16_synchsafe(uint8_t buf[2]) {
180 return ((uint16_t)(buf[0] & 0x7F) << 7) |
181 (uint16_t)(buf[1] & 0x7F);
187 return ((uint32_t)(buf[0] & 0x7F) << 14) |
188 ((uint32_t)(buf[1] & 0x7F) << 7) |
189 (uint32_t)(buf[2] & 0x7F);
194 return ((uint32_t)(buf[0] & 0x7F) << 21) |
195 ((uint32_t)(buf[1] & 0x7F) << 14) |
196 ((uint32_t)(buf[2] & 0x7F) << 7) |
197 (uint32_t)(buf[3] & 0x7F);
202 return ((uint32_t)(buf[0] & 0x07) << 28) |
203 ((uint32_t)(buf[1] & 0x7F) << 21) |
204 ((uint32_t)(buf[2] & 0x7F) << 14) |
205 ((uint32_t)(buf[3] & 0x7F) << 7) |
206 (uint32_t)(buf[4] & 0x7F);
#define ID3V23_EXT_HEADER_FLAG
Definition: id3.h:57
xine_t * xine
Definition: xine_internal.h:126
#define ID3V22_FRAME_HEADER_SIZE
Definition: id3.h:50
static int id3v24_interp_frame(input_plugin_t *input, xine_stream_t *stream, id3v24_frame_header_t *frame_header)
Definition: id3.c:733
static uint32_t _X_BE_24_synchsafe(uint8_t buf[3])
Definition: id3.h:186
Definition: xine_internal.h:123
int id3v2_parse_tag(input_plugin_t *input, xine_stream_t *stream, uint32_t id3_signature)
Generic function for ID3v2 tags parsing.
Definition: id3.c:885
static int id3v23_parse_tag(input_plugin_t *input, xine_stream_t *stream, uint32_t id3_signature)
Definition: id3.c:541
#define ID3V24_FRAME_HEADER_SIZE
Definition: id3.h:88
id3v2_header_t id3v24_footer_t
Definition: id3.h:128
#define ID3V24_ZERO_FLAG
Definition: id3.h:79
static int id3v2_parse_header(input_plugin_t *input, uint32_t id3_signature, id3v2_header_t *tag_header)
Definition: id3.c:230
void _x_meta_info_set_generic(xine_stream_t *s, int info, const char *str, const char *enc)
Definition: info_helper.c:331
static int id3v24_parse_tag(input_plugin_t *input, xine_stream_t *stream, uint32_t id3_signature)
Definition: id3.c:810
static int id3v24_parse_ext_header(input_plugin_t *input, id3v24_frame_ext_header_t *frame_ext_header)
Definition: id3.c:649
void _x_meta_info_set(xine_stream_t *s, int info, const char *str)
Definition: info_helper.c:321
static const char id3_encoding[][12]
Definition: id3.c:84
#define ID3V24_EXT_UPDATE_FLAG
Definition: id3.h:82
#define be2me_32(x)
Definition: ffmpeg_bswap.h:168
#define ID3V2X_MASK
Definition: id3.h:39
#define ID3V24_EXT_CRC_FLAG
Definition: id3.h:83
#define ID3_GENRE_COUNT
Definition: id3.c:50
static int id3v23_interp_frame(input_plugin_t *input, xine_stream_t *stream, id3v23_frame_header_t *frame_header)
Definition: id3.c:468
#define lprintf(...)
Definition: xineutils.h:620
static int id3v22_interp_frame(input_plugin_t *input, xine_stream_t *stream, id3v22_frame_header_t *frame_header)
Definition: id3.c:271
#define ID3V24_EXT_RESTRICTIONS_FLAG
Definition: id3.h:84
uint8_t genre
Definition: id3.h:150
#define ID3V23_ZERO_FLAG
Definition: id3.h:59
#define ID3V24_TAG
Definition: id3.h:35
#define _X_BE_16(x)
Definition: bswap.h:40
#define ID3V23_UNSYNCH_FLAG
Definition: id3.h:56
#define ID3V24_EXPERIMENTAL_FLAG
Definition: id3.h:77
#define ID3V23_FRAME_HEADER_SIZE
Definition: id3.h:62
#define ID3V23_TAG
Definition: id3.h:34
#define XINE_META_INFO_TRACK_NUMBER
Definition: xine.h:1073
#define ID3V24_FOOTER_SIZE
Definition: id3.h:100
#define ID3V24_FOOTER_FLAG
Definition: id3.h:78
static const char id3_genre[][24]
Definition: id3.c:51
#define XINE_VERBOSITY_LOG
Definition: xine.h:425
#define _x_assert(exp)
Definition: xineutils.h:550
#define ID3V22_UNSYNCH_FLAG
Definition: id3.h:45
#define XINE_META_INFO_ALBUM
Definition: xine.h:1066
static int id3v22_parse_frame_header(input_plugin_t *input, id3v22_frame_header_t *frame_header)
Definition: id3.c:251
#define ID3V22_COMPRESS_FLAG
Definition: id3.h:46
#define XINE_META_INFO_ARTIST
Definition: xine.h:1064
int id3v2_parse_tag(input_plugin_t *input, xine_stream_t *stream, uint32_t id3_signature)
Generic function for ID3v2 tags parsing.
Definition: id3.c:885
#define ID3_ENCODING_COUNT
Definition: id3.c:83
#define XINE_META_INFO_YEAR
Definition: xine.h:1067
#define XINE_VERBOSITY_DEBUG
Definition: xine.h:426
static int id3v2_istag(uint32_t id3_signature)
Checks if the given buffer is an ID3 tag preamble.
Definition: id3.h:173
static int id3v24_parse_genre(char *dest, const char *src, size_t len)
Definition: id3.c:615
#define XINE_META_INFO_COMMENT
Definition: xine.h:1063
#define XINE_META_INFO_DISCNUMBER
Definition: xine.h:1090
static int id3v22_parse_tag(input_plugin_t *input, xine_stream_t *stream, uint32_t id3_signature)
Definition: id3.c:341
#define LOG_MODULE
Definition: id3.c:39
#define ID3V22_ZERO_FLAG
Definition: id3.h:47
#define XINE_META_INFO_GENRE
Definition: xine.h:1065
#define ID3V2X_TAG
Definition: id3.h:38
#define _X_BE_32(x)
Definition: bswap.h:45
void _x_meta_info_n_set(xine_stream_t *s, int info, const char *buf, int len)
Definition: info_helper.c:351
#define _X_BE_24(x)
Definition: bswap.h:42
#define ID3V24_EXT_ZERO_FLAG
Definition: id3.h:85
#define ID3V24_EXT_HEADER_FLAG
Definition: id3.h:76
#define ID3V24_UNSYNCH_FLAG
Definition: id3.h:75
int id3v1_parse_tag(input_plugin_t *input, xine_stream_t *stream)
Definition: id3.c:90
#define ID3V22_TAG
Definition: id3.h:33
static int input(void)
Definition: goomsl_lex.c:1495
static int id3v2_parse_genre(char *dest, const char *src, size_t len)
Definition: id3.c:123
static uint32_t _X_BE_32_synchsafe(uint8_t buf[4])
Definition: id3.h:193
static int id3v24_parse_frame_header(input_plugin_t *input, id3v24_frame_header_t *frame_header)
Definition: id3.c:629
static int id3v23_parse_frame_ext_header(input_plugin_t *input, id3v23_frame_ext_header_t *frame_ext_header)
Definition: id3.c:432
#define xprintf(xine, verbose,...)
Definition: xineutils.h:664
static int id3v23_parse_frame_header(input_plugin_t *input, id3v23_frame_header_t *frame_header)
Definition: id3.c:412
#define XINE_META_INFO_TITLE
Definition: xine.h:1062
#define BE_FOURCC(ch0, ch1, ch2, ch3)
Definition: bswap.h:133
int id3v1_parse_tag(input_plugin_t *input, xine_stream_t *stream)
Definition: id3.c:90
static uint32_t BE_35_synchsafe(uint8_t buf[5])
Definition: id3.h:201