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 language[4]; /* the language of the frame's content, according to ISO-639-2 */ 51 FrameDataNode *v2_head, *v2_tail; 52 } id3tag_spec; 53 54 55 /* write tag into stream at current position */ 56 extern int id3tag_write_v2(lame_global_flags * gfp); 57 extern int id3tag_write_v1(lame_global_flags * gfp); 58 /* 59 * NOTE: A version 2 tag will NOT be added unless one of the text fields won't 60 * fit in a version 1 tag (e.g. the title string is longer than 30 characters), 61 * or the "id3tag_add_v2" or "id3tag_v2_only" functions are used. 62 */ 63 64 #endif 65