|
Packit |
47f805 |
|
|
Packit |
47f805 |
#ifndef LAME_ID3_H
|
|
Packit |
47f805 |
#define LAME_ID3_H
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
#define CHANGED_FLAG (1U << 0)
|
|
Packit |
47f805 |
#define ADD_V2_FLAG (1U << 1)
|
|
Packit |
47f805 |
#define V1_ONLY_FLAG (1U << 2)
|
|
Packit |
47f805 |
#define V2_ONLY_FLAG (1U << 3)
|
|
Packit |
47f805 |
#define SPACE_V1_FLAG (1U << 4)
|
|
Packit |
47f805 |
#define PAD_V2_FLAG (1U << 5)
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
enum {
|
|
Packit |
47f805 |
MIMETYPE_NONE = 0,
|
|
Packit |
47f805 |
MIMETYPE_JPEG,
|
|
Packit |
47f805 |
MIMETYPE_PNG,
|
|
Packit |
47f805 |
MIMETYPE_GIF
|
|
Packit |
47f805 |
};
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
typedef struct FrameDataNode {
|
|
Packit |
47f805 |
struct FrameDataNode *nxt;
|
|
Packit |
47f805 |
uint32_t fid; /* Frame Identifier */
|
|
Packit |
47f805 |
char lng[4]; /* 3-character language descriptor */
|
|
Packit |
47f805 |
struct {
|
|
Packit |
47f805 |
union {
|
|
Packit |
47f805 |
char *l; /* ptr to Latin-1 chars */
|
|
Packit |
47f805 |
unsigned short *u; /* ptr to UCS-2 text */
|
|
Packit |
47f805 |
unsigned char *b; /* ptr to raw bytes */
|
|
Packit |
47f805 |
} ptr;
|
|
Packit |
47f805 |
size_t dim;
|
|
Packit |
47f805 |
int enc; /* 0:Latin-1, 1:UCS-2, 2:RAW */
|
|
Packit |
47f805 |
} dsc , txt;
|
|
Packit |
47f805 |
} FrameDataNode;
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
typedef struct id3tag_spec {
|
|
Packit |
47f805 |
/* private data members */
|
|
Packit |
47f805 |
unsigned int flags;
|
|
Packit |
47f805 |
int year;
|
|
Packit |
47f805 |
char *title;
|
|
Packit |
47f805 |
char *artist;
|
|
Packit |
47f805 |
char *album;
|
|
Packit |
47f805 |
char *comment;
|
|
Packit |
47f805 |
int track_id3v1;
|
|
Packit |
47f805 |
int genre_id3v1;
|
|
Packit |
47f805 |
unsigned char *albumart;
|
|
Packit |
47f805 |
unsigned int albumart_size;
|
|
Packit |
47f805 |
unsigned int padding_size;
|
|
Packit |
47f805 |
int albumart_mimetype;
|
|
Packit |
47f805 |
char language[4]; /* the language of the frame's content, according to ISO-639-2 */
|
|
Packit |
47f805 |
FrameDataNode *v2_head, *v2_tail;
|
|
Packit |
47f805 |
} id3tag_spec;
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
/* write tag into stream at current position */
|
|
Packit |
47f805 |
extern int id3tag_write_v2(lame_global_flags * gfp);
|
|
Packit |
47f805 |
extern int id3tag_write_v1(lame_global_flags * gfp);
|
|
Packit |
47f805 |
/*
|
|
Packit |
47f805 |
* NOTE: A version 2 tag will NOT be added unless one of the text fields won't
|
|
Packit |
47f805 |
* fit in a version 1 tag (e.g. the title string is longer than 30 characters),
|
|
Packit |
47f805 |
* or the "id3tag_add_v2" or "id3tag_v2_only" functions are used.
|
|
Packit |
47f805 |
*/
|
|
Packit |
47f805 |
|
|
Packit |
47f805 |
#endif
|