1 /* Copyright 2005 Jan Schmidt <thaytan@mad.scientist.com>
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Library General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
13 * You should have received a copy of the GNU Library General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 * Boston, MA 02111-1307, USA.
26 #define ID3V2_MARK_SIZE 3
27 #define ID3V2_HDR_SIZE GST_TAG_ID3V2_HEADER_SIZE
30 guint id3v2_read_synch_uint (const guint8 * data, guint size);
32 /* Things shared by id3tags.c and id3v2frames.c */
33 #define ID3V2_VERSION 0x0400
34 #define ID3V2_VER_MAJOR(v) ((v) >> 8)
35 #define ID3V2_VER_MINOR(v) ((v) & 0xff)
43 guint32 frame_data_size;
46 guint8 ext_flag_bytes;
47 guint8 *ext_flag_data;
56 /* Current frame decoding */
64 /* To collect day/month from obsolete TDAT frame if it exists */
70 ID3V2_HDR_FLAG_UNSYNC = 0x80,
71 ID3V2_HDR_FLAG_EXTHDR = 0x40,
72 ID3V2_HDR_FLAG_EXPERIMENTAL = 0x20,
73 ID3V2_HDR_FLAG_FOOTER = 0x10
77 ID3V2_EXT_FLAG_UPDATE = 0x80,
78 ID3V2_EXT_FLAG_CRC = 0x40,
79 ID3V2_EXT_FLAG_RESTRICTED = 0x20
83 ID3V2_FRAME_STATUS_FRAME_ALTER_PRESERVE = 0x4000,
84 ID3V2_FRAME_STATUS_FILE_ALTER_PRESERVE = 0x2000,
85 ID3V2_FRAME_STATUS_READONLY = 0x1000,
86 ID3V2_FRAME_FORMAT_GROUPING_ID = 0x0040,
87 ID3V2_FRAME_FORMAT_COMPRESSION = 0x0008,
88 ID3V2_FRAME_FORMAT_ENCRYPTION = 0x0004,
89 ID3V2_FRAME_FORMAT_UNSYNCHRONISATION = 0x0002,
90 ID3V2_FRAME_FORMAT_DATA_LENGTH_INDICATOR = 0x0001
93 #define ID3V2_3_FRAME_FLAGS_MASK \
94 (ID3V2_FRAME_STATUS_FRAME_ALTER_PRESERVE | \
95 ID3V2_FRAME_STATUS_FILE_ALTER_PRESERVE | \
96 ID3V2_FRAME_STATUS_READONLY | \
97 ID3V2_FRAME_FORMAT_GROUPING_ID | \
98 ID3V2_FRAME_FORMAT_COMPRESSION | \
99 ID3V2_FRAME_FORMAT_ENCRYPTION)
101 /* FIXME 0.11: remove 'private' bit from GST_TAG_ID3V2_FRAME */
103 * GST_TAG_ID3V2_FRAME:
105 * Contains a single unprocessed ID3v2 frame. (buffer)
107 * (Not public API for now)
109 #define GST_TAG_ID3V2_FRAME "private-id3v2-frame"
111 /* From id3v2frames.c */
112 gboolean id3v2_parse_frame (ID3TagsWorking *work);
114 guint8 * id3v2_ununsync_data (const guint8 * unsync_data, guint32 * size);
116 GstDebugCategory * id3v2_ensure_debug_category (void);