Debian Codegraph @

libmp3lame/id3tag.h

raw
1
2 #ifndef LAME_ID3_H
3 #define LAME_ID3_H
4
5
6 #define CHANGED_FLAG (1U << 0)
7 #define ADD_V2_FLAG (1U << 1)
8 #define V1_ONLY_FLAG (1U << 2)
9 #define V2_ONLY_FLAG (1U << 3)
10 #define SPACE_V1_FLAG (1U << 4)
11 #define PAD_V2_FLAG (1U << 5)
12 // flag for enabling writing ID3v2.4 with UTF-8 characters
13 #define V2_4_UTF8_FLAG (1U << 6)
14
15 enum {
16 MIMETYPE_NONE = 0,
17 MIMETYPE_JPEG,
18 MIMETYPE_PNG,
19 MIMETYPE_GIF
20 };
21
22 typedef struct FrameDataNode {
23 struct FrameDataNode *nxt;
24 uint32_t fid; /* Frame Identifier */
25 char lng[4]; /* 3-character language descriptor */
26 struct {
27 union {
28 char *l; /* ptr to Latin-1 chars */
29 unsigned short *u; /* ptr to UCS-2 text */
30 unsigned char *b; /* ptr to raw bytes */
31 } ptr;
32 size_t dim;
33 int enc; /* 0:Latin-1, 1:UCS-2, 2:RAW, 3:UTF-8 */
34 } dsc , txt;
35 } FrameDataNode;
36
37
38 typedef struct id3tag_spec {
39 /* private data members */
40 unsigned int flags;
41 int year;
42 char *title;
43 char *artist;
44 char *album;
45 char *comment;
46 int track_id3v1;
47 int genre_id3v1;
48 unsigned char *albumart;
49 unsigned int albumart_size;
50 unsigned int padding_size;
51 int albumart_mimetype;
52 char language[4]; /* the language of the frame's content, according to ISO-639-2 */
53 FrameDataNode *v2_head, *v2_tail;
54 } id3tag_spec;
55
56
57 /* write tag into stream at current position */
58 extern int id3tag_write_v2(lame_global_flags * gfp);
59 extern int id3tag_write_v1(lame_global_flags * gfp);
60 /*
61 * NOTE: A version 2 tag will NOT be added unless one of the text fields won't
62 * fit in a version 1 tag (e.g. the title string is longer than 30 characters),
63 * or the "id3tag_add_v2", "id3tag_add_v2_4_UTF8", "id3tag_v2_only", or
64 * "id3tag_v2_4_UTF8_only" functions are used.
65 */
66
67 #endif