id3dev 26.01
An ID3 metadata library
Loading...
Searching...
No Matches
id3v2Types.h
Go to the documentation of this file.
1
11
12#ifndef ID3V2_TYPES
13#define ID3V2_TYPES
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#include "id3v1/id3v1Types.h"
20#include <stdbool.h>
21#include <stdint.h>
22#include <inttypes.h>
23
24// data structures
25
26#include "id3dependencies/LinkedListLib/include/LinkedList.h"
27#include "id3dependencies/HashTableLib/include/hashTable.h"
28#include "id3dependencies/ByteStream/include/byteDefines.h"
29
31#define ID3V2_TAG_ID_SIZE 3
32
34#define ID3V2_TAG_ID_MAGIC_NUMBER_H 0x494433
35
37#define ID3V2_TAG_ID_MAGIC_NUMBER_F 0x334449
38
40#define ID3V2_TAG_VERSION_2 2
41
43#define ID3V2_TAG_VERSION_3 3
44
46#define ID3V2_TAG_VERSION_4 4
47
49#define ID3V2_ENCODING_ISO_8859_1 BYTE_ISO_8859_1
50
52#define ID3V2_ENCODING_UTF16LE BYTE_UTF16LE
53
55#define ID3V2_ENCODING_UTF16BE BYTE_UTF16BE
56
58#define ID3V2_ENCODING_UTF8 BYTE_UTF8
59
61#define ID3V2_ENCODING_ASCII BYTE_ASCII
62
64#define ID3V2_ENCODING_OTHER BYTE_OTHER_ENCODING
65
70#define ID3V2_FRAME_ID_MAX_SIZE 4
71
76#define ID3V2_FRAME_FLAG_SIZE 2
77
86 uint32_t padding;
87
89 uint32_t crc;
90
92 bool update;
93
96
104
127
157
229
237typedef struct _Id3v2ContentContext {
240
242 size_t key;
243
248 size_t min;
249
254 size_t max;
256
263typedef struct _Id3v2ContentEntry {
265 void *entry;
266
268 size_t size;
270
287
301
302#ifdef __cplusplus
303} // extern c end
304#endif
305
306#endif
Definitions for ID3v1 tag structure, constants, and genre enumeration.
struct _Id3v2ContentEntry Id3v2ContentEntry
Parsed data field from an ID3v2 frame.
struct _Id3v2ContentContext Id3v2ContentContext
Parsing instructions for a single field within an ID3v2 frame.
struct _Id3v2Tag Id3v2Tag
Complete ID3v2 tag structure containing header and metadata frames.
#define ID3V2_FRAME_ID_MAX_SIZE
Maximum size in bytes for a frame ID field (4 bytes).
Definition id3v2Types.h:70
_Id3v2ContextType
Context types for parsing and writing ID3v2 frame content fields.
Definition id3v2Types.h:162
@ noEncoding_context
Raw character data with no encoding or null terminator.
Definition id3v2Types.h:173
@ iter_context
Iterator for repeating context sequences.
Definition id3v2Types.h:221
@ numeric_context
Integer values of 8, 16, 32, or 64 bits.
Definition id3v2Types.h:197
@ encodedString_context
Text string with encoding determined by prior context with the key 'encoding'.
Definition id3v2Types.h:185
@ latin1Encoding_context
Latin-1 (ISO-8859-1) null-terminated string.
Definition id3v2Types.h:191
@ adjustment_context
Dynamic upper bound adjustment based on prior context with key 'adjustment'.
Definition id3v2Types.h:227
@ binary_context
Binary data block with no terminator.
Definition id3v2Types.h:179
@ bit_context
Bit-level field (1-8 bits).
Definition id3v2Types.h:215
@ precision_context
Floating-point values (float or double).
Definition id3v2Types.h:203
@ unknown_context
Error/invalid context state (-1).
Definition id3v2Types.h:167
struct _Id3v2ExtendedTagHeader Id3v2ExtendedTagHeader
Optional ID3v2 extended header containing supplementary tag metadata.
enum _Id3v2ContextType Id3v2ContextType
Context types for parsing and writing ID3v2 frame content fields.
struct _Id3v2Frame Id3v2Frame
Complete ID3v2 frame structure with header, parsing contexts, and data.
struct _Id3v2FrameHeader Id3v2FrameHeader
ID3v2 frame header containing identification and processing flags.
struct _Id3v2TagHeader Id3v2TagHeader
ID3v2 tag header containing version and parsing information.
Parsing instructions for a single field within an ID3v2 frame.
Definition id3v2Types.h:237
size_t min
Minimum size in bytes (or bits for bit_context, or start index for iter_context).
Definition id3v2Types.h:248
size_t max
Maximum size in bytes (or bits for bit_context, or iteration count for iter_context).
Definition id3v2Types.h:254
Id3v2ContextType type
Context type determining parsing behavior (string, binary, numeric, etc.)
Definition id3v2Types.h:239
size_t key
Hashed identifier string for this field. Used to reference this context from other contexts (e....
Definition id3v2Types.h:242
Parsed data field from an ID3v2 frame.
Definition id3v2Types.h:263
size_t size
Size in bytes of the data pointed to by entry.
Definition id3v2Types.h:268
void * entry
Pointer to extracted field data (string, binary, numeric, etc.). Type determined by corresponding con...
Definition id3v2Types.h:265
Optional ID3v2 extended header containing supplementary tag metadata.
Definition id3v2Types.h:84
uint8_t restrictions
Bitfield defining tag restrictions in format ppqrrstt (ID3v2.4 only).
Definition id3v2Types.h:102
uint32_t crc
CRC-32 checksum of the tag's audio data for integrity verification.
Definition id3v2Types.h:89
uint32_t padding
Size of the extended header as either a 32-bit integer or syncsafe integer depending on version.
Definition id3v2Types.h:86
bool update
Indicates this tag is an update to a previous tag (ID3v2.4 only)
Definition id3v2Types.h:92
bool tagRestrictions
Indicates whether tag restrictions are applied.
Definition id3v2Types.h:95
ID3v2 frame header containing identification and processing flags.
Definition id3v2Types.h:132
uint8_t groupSymbol
Group identifier to associate related frames. 0 if frame is not grouped.
Definition id3v2Types.h:155
bool fileAlterPreservation
Marks the frame as unknown if the file is altered.
Definition id3v2Types.h:140
bool readOnly
Marks the frame as read only. If true, frame content is read-only and should not be modified.
Definition id3v2Types.h:143
uint8_t encryptionSymbol
Encryption method identifier. 0 if frame is not encrypted.
Definition id3v2Types.h:152
bool tagAlterPreservation
Marks the frame as unknown if the tag is altered.
Definition id3v2Types.h:137
bool unsynchronisation
Marks a tag as unsynchronised.
Definition id3v2Types.h:146
uint32_t decompressionSize
Decompressed size in bytes if frame uses zlib compression. 0 if uncompressed.
Definition id3v2Types.h:149
Complete ID3v2 frame structure with header, parsing contexts, and data.
Definition id3v2Types.h:277
Id3v2FrameHeader * header
Frame header containing ID, flags, and processing parameters.
Definition id3v2Types.h:279
List * contexts
Linked list of Id3v2ContentContext parsing instructions defining frame field structure.
Definition id3v2Types.h:282
List * entries
Linked list of Id3v2ContentEntry parsed data fields corresponding to contexts.
Definition id3v2Types.h:285
ID3v2 tag header containing version and parsing information.
Definition id3v2Types.h:111
uint8_t minorVersion
Minor version/revision number.
Definition id3v2Types.h:116
Id3v2ExtendedTagHeader * extendedHeader
Pointer to optional extended header structure. NULL if extended header flag not set.
Definition id3v2Types.h:125
uint8_t majorVersion
Major version number (2, 3, or 4 for ID3v2.2, ID3v2.3, ID3v2.4)
Definition id3v2Types.h:113
uint8_t flags
Bitfield in format abcd0000 defining extra format and feature options of a tag.
Definition id3v2Types.h:122
Complete ID3v2 tag structure containing header and metadata frames.
Definition id3v2Types.h:294
List * frames
Linked list of Id3v2Frame structures containing all tag metadata.
Definition id3v2Types.h:299
Id3v2TagHeader * header
Tag header with version, flags, and optional extended header.
Definition id3v2Types.h:296