]> 4ch.mooo.com Git - 16.git/blob - src/lib/doslib/ext/lame/id3tag.h
cd389678d0f92e1654d19d77f51be190d71ffd48
[16.git] / src / lib / doslib / ext / lame / id3tag.h
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
13 enum {
14     MIMETYPE_NONE = 0,
15     MIMETYPE_JPEG,
16     MIMETYPE_PNG,
17     MIMETYPE_GIF,
18 };
19
20 typedef struct FrameDataNode {
21     struct FrameDataNode *nxt;
22     uint32_t fid;             /* Frame Identifier                 */
23     char    lng[4];          /* 3-character language descriptor  */
24     struct {
25         union {
26             char   *l;       /* ptr to Latin-1 chars             */
27             unsigned short *u; /* ptr to UCS-2 text                */
28             unsigned char *b; /* ptr to raw bytes                 */
29         } ptr;
30         size_t  dim;
31         int     enc;         /* 0:Latin-1, 1:UCS-2, 2:RAW        */
32     } dsc  , txt;
33 } FrameDataNode;
34
35
36 typedef struct id3tag_spec {
37     /* private data members */
38     unsigned int flags;
39     int     year;
40     char   *title;
41     char   *artist;
42     char   *album;
43     char   *comment;
44     int     track_id3v1;
45     int     genre_id3v1;
46     unsigned char *albumart;
47     unsigned int albumart_size;
48     unsigned int padding_size;
49     int     albumart_mimetype;
50     char  **values;
51     unsigned int num_values;
52     FrameDataNode *v2_head, *v2_tail;
53 } id3tag_spec;
54
55
56 /* write tag into stream at current position */
57 extern int id3tag_write_v2(lame_global_flags * gfp);
58 extern int id3tag_write_v1(lame_global_flags * gfp);
59 /*
60  * NOTE: A version 2 tag will NOT be added unless one of the text fields won't
61  * fit in a version 1 tag (e.g. the title string is longer than 30 characters),
62  * or the "id3tag_add_v2" or "id3tag_v2_only" functions are used.
63  */
64
65 #endif