mplib.h File Reference

Go to the source code of this file.

Data Structures

struct  _mpeg_header
 Header structure with 4 segments containing 32 bit header information. More...
struct  _id3_tag
 Generic tag structure. More...
struct  _id3_tag_list
 list of tags found in file More...
struct  _id3v1_tag
 ID3v1 tag structure. More...
struct  _id3v2_frame
 ID3v2 Frame structure. More...
struct  _id3v2_frame_list
 Single linked list referencing a number of frames. More...
struct  _id3v2_extended_header
 ID3v2 Extended Header structure. More...
struct  _id3v2_header
 ID3v2 Header structure. More...
struct  _id3v2_tag
 ID3v2 tag structure. More...
struct  _id3_content
 A fields content unparsed. More...
struct  _id3_text_content
 Content type for regular text. More...
struct  _id3_comment_content
 Content type for comment fields. More...
struct  _mem_arg
struct  _file_arg

Defines

#define __BEGIN_DECLS
#define __END_DECLS
#define __P(protos)   ()
#define MP_ARTIST   1
#define MP_TITLE   2
#define MP_ALBUM   3
#define MP_GENRE   4
#define MP_COMMENT   5
#define MP_YEAR   6
#define MP_TRACK   7
#define ISO_8859_1   0
#define UTF16   1
#define UTF16BE   2
#define UTF8   3
#define MP_EERROR   1
#define MP_EFNF   2
#define MP_EFCOMPR   3
#define MP_EFENCR   4
#define MP_EVERSION   6
#define mp_free_mpeg_header(str)   xfree(str)
 Frees a mpeg header structure.

Typedefs

typedef _mpeg_header mpeg_header
 Header structure with 4 segments containing 32 bit header information.
typedef _id3_tag id3_tag
 Generic tag structure.
typedef _id3_tag_list id3_tag_list
 list of tags found in file
typedef _id3v1_tag id3v1_tag
 ID3v1 tag structure.
typedef _id3v2_frame id3v2_frame
 ID3v2 Frame structure.
typedef _id3v2_frame_list id3v2_frame_list
 Single linked list referencing a number of frames.
typedef _id3v2_extended_header id3v2_extended_header
 ID3v2 Extended Header structure.
typedef _id3v2_header id3v2_header
 ID3v2 Header structure.
typedef _id3v2_tag id3v2_tag
 ID3v2 tag structure.
typedef _id3_content id3_content
 A fields content unparsed.
typedef enum _id3_encoding id3_encoding
 Character encodings list.
typedef _id3_text_content id3_text_content
 Content type for regular text.
typedef _id3_comment_content id3_comment_content
 Content type for comment fields.
typedef _mem_arg mem_arg
typedef _file_arg file_arg

Enumerations

enum  _id3_encoding { iso_8859_1 = ISO_8859_1, utf16 = UTF16, utf16be = UTF16BE, utf8 = UTF8 }
 Character encodings list. More...

Functions

mpeg_headermp_get_mpeg_header_from_file (const char *path)
 Allocates a MPEG header structure from a file.
mpeg_headermp_get_mpeg_header_from_fd (int fd)
 Gets the header structure from a file descriptor.
char * mp_get_str_version (const mpeg_header *)
 Allocates a label with the appropriate header field value as a string.
char * mp_get_str_layer (const mpeg_header *)
 Allocates a label with the appropriate header field value as a string.
char * mp_get_str_bitrate (const mpeg_header *)
 Allocates a label with the appropriate header field value as a string.
char * mp_get_str_samplingfreq (const mpeg_header *)
 Allocates a label with the appropriate header field value as a string.
char * mp_get_str_mode (const mpeg_header *)
 Allocates a label with the appropriate header field value as a string.
id3_tag_listmp_get_tag_list_from_file (const char *path)
 Allocates and fills a list of tags found in the given file.
id3_tag_listmp_get_tag_list_from_fd (int fd)
 Allocates and fills a list of tags found in the given file.
id3_tag_listmp_get_tag_list_from_mem (void *buf, size_t s)
 Allocates and fills a list of tags found in the given memory buffer.
id3_tag_listmp_get_tag_list (size_t(*read_func)(void *, size_t, void *), off_t(*lseek_func)(off_t, int, void *), void *arg)
 Allocates and fills a list of tags using read and seek wrapper functions.
void mp_free_list (id3_tag_list *)
 Frees a tag list beginning with the given element XXX.
id3_contentmp_get_content (const id3_tag *t, int f)
 Gets the first content found of a specified field in the given tag and allocates a struct.
id3_contentmp_get_content_at_pos (const id3_tag *t, int f, int pos)
 It's posible that a tag has multiple ocurances of a field, use this function to get a specified field by position.
id3_contentmp_get_content_custom (const id3_tag *t, const char *f)
 Gets a custom fields content and allocates a struct.
id3_contentmp_get_content_custom_at_pos (const id3_tag *t, const char *f, int pos)
 See mp_get_content_at_pos() and mp_get_content_custom().
void mp_free_content (id3_content *)
 Frees a content struct.
void mp_free_text_content (id3_text_content *)
 Frees a text struct.
void mp_free_comment_content (id3_comment_content *)
 Frees a comment struct.
int mp_set_content (id3_tag *t, int field, id3_content *content)
 Copys the value of a specified field into the given tag.
int mp_set_content_at_pos (id3_tag *t, int field, id3_content *content, int pos)
 Copys the value of a specified field into the given tag.
int mp_set_custom_content (id3_tag *t, char *field, id3_content *content)
 Sets up a new custom field with the given value.
int mp_set_custom_content_at_pos (id3_tag *t, char *field, id3_content *content, int pos)
 Sets up a new custom field with the given value on a certain frame position.
int mp_write_to_file (const id3_tag_list *ls, const char *path)
 Writes the tag to the specified file.
int mp_write_to_fd (const id3_tag_list *ls, int fd)
 Writes the tag to the specified file.
int mp_del_tags_from_file (const char *path)
 Deletes all tags in file.
int mp_del_tags_from_fd (int fd)
 Deletes all tags in file.
int mp_del_tags_by_ver_from_file (const char *path, int version)
 Deletes all tags in file with the specified version.
int mp_del_tags_by_ver_from_fd (int fd, int version)
 Deletes all tags in file with the specified version.
int mp_convert_to_v1 (id3_tag *t)
 Converts a tag to id3v1 tag format.
int mp_convert_to_v2 (id3_tag *t)
 Converts a tag to id3v2 tag format.
int mp_is_valid_v1_value (int field, char *value)
 Checks wether the given value would be a valid v1 field.
id3_text_contentmp_parse_artist (const id3_content *content)
 Parses the artist field.
id3_text_contentmp_parse_title (const id3_content *content)
 Parses the title field.
id3_text_contentmp_parse_album (const id3_content *content)
 Parses the album field.
id3_text_contentmp_parse_year (const id3_content *content)
 Parses the year field.
id3_text_contentmp_parse_genre (const id3_content *content)
 Parses the genre field.
id3_text_contentmp_parse_track (const id3_content *content)
 Parses the track field.
id3_text_contentmp_parse_text (const id3_content *content)
 Generic function for parsing text fields.
id3_comment_contentmp_parse_comment (const id3_content *content)
 Parses the comment field.
id3_contentmp_assemble_text_content (const char *text, id3_encoding enc)
 Assembles content from a comont text content.
id3_contentmp_assemble_comment_content (const char *text, const char *descr, id3_encoding enc, const char *lang)
 Assembles content from a comment.
id3_tagmp_alloc_tag (void)
 Gets a new allocated tag.
id3_tagmp_alloc_tag_with_version (int)
 Gets a new allocated tag with the specified version.
void mp_free_tag (id3_tag *t)
 Frees tag struct.


Define Documentation

#define __BEGIN_DECLS
 

Definition at line 46 of file mplib.h.

#define __END_DECLS
 

Definition at line 47 of file mplib.h.

#define __P protos   )     ()
 

Definition at line 59 of file mplib.h.

#define ISO_8859_1   0
 

Definition at line 97 of file mplib.h.

#define MP_ALBUM   3
 

Definition at line 91 of file mplib.h.

#define MP_ARTIST   1
 

Definition at line 89 of file mplib.h.

#define MP_COMMENT   5
 

Definition at line 93 of file mplib.h.

#define MP_EERROR   1
 

Definition at line 106 of file mplib.h.

#define MP_EFCOMPR   3
 

Definition at line 108 of file mplib.h.

#define MP_EFENCR   4
 

Definition at line 109 of file mplib.h.

#define MP_EFNF   2
 

Definition at line 107 of file mplib.h.

#define MP_EVERSION   6
 

Definition at line 111 of file mplib.h.

#define mp_free_mpeg_header str   )     xfree(str)
 

Frees a mpeg header structure.

Parameters:
str The allocated mpeg header

Definition at line 293 of file mplib.h.

#define MP_GENRE   4
 

Definition at line 92 of file mplib.h.

#define MP_TITLE   2
 

Definition at line 90 of file mplib.h.

#define MP_TRACK   7
 

Definition at line 95 of file mplib.h.

#define MP_YEAR   6
 

Definition at line 94 of file mplib.h.

#define UTF16   1
 

Definition at line 98 of file mplib.h.

#define UTF16BE   2
 

Definition at line 99 of file mplib.h.

#define UTF8   3
 

Definition at line 100 of file mplib.h.


Typedef Documentation

typedef struct _file_arg file_arg
 

typedef struct _id3_comment_content id3_comment_content
 

Content type for comment fields.

typedef struct _id3_content id3_content
 

A fields content unparsed.

typedef enum _id3_encoding id3_encoding
 

Character encodings list.

typedef struct _id3_tag id3_tag
 

Generic tag structure.

typedef struct _id3_tag_list id3_tag_list
 

list of tags found in file

typedef struct _id3_text_content id3_text_content
 

Content type for regular text.

typedef struct _id3v1_tag id3v1_tag
 

ID3v1 tag structure.

typedef struct _id3v2_extended_header id3v2_extended_header
 

ID3v2 Extended Header structure.

typedef struct _id3v2_frame id3v2_frame
 

ID3v2 Frame structure.

typedef struct _id3v2_frame_list id3v2_frame_list
 

Single linked list referencing a number of frames.

typedef struct _id3v2_header id3v2_header
 

ID3v2 Header structure.

typedef struct _id3v2_tag id3v2_tag
 

ID3v2 tag structure.

typedef struct _mem_arg mem_arg
 

typedef struct _mpeg_header mpeg_header
 

Header structure with 4 segments containing 32 bit header information.


Enumeration Type Documentation

enum _id3_encoding
 

Character encodings list.

Enumerator:
iso_8859_1 
utf16 
utf16be 
utf8 

Definition at line 245 of file mplib.h.


Function Documentation

id3_tag* mp_alloc_tag void   ) 
 

Gets a new allocated tag.

Returns:
new allocated tag

Definition at line 961 of file mplib.c.

id3_tag* mp_alloc_tag_with_version int   ) 
 

Gets a new allocated tag with the specified version.

Returns:
new allocated tag with specified version

Definition at line 970 of file mplib.c.

id3_content* mp_assemble_comment_content const char *  text,
const char *  descr,
id3_encoding  enc,
const char *  lang
 

Assembles content from a comment.

Parameters:
text the text
descr a short describtion to the text (NULL)
enc the texts encoding
lang the comments language (NULL)
Returns:
A pointer to a new initialized content structure

Definition at line 247 of file mplib_paas.c.

id3_content* mp_assemble_text_content const char *  text,
id3_encoding  enc
 

Assembles content from a comont text content.

Parameters:
text the text
enc the texts encoding (NULL)
Returns:
A pointer to a new initialized content structure

Definition at line 231 of file mplib_paas.c.

int mp_convert_to_v1 id3_tag t  ) 
 

Converts a tag to id3v1 tag format.

Parameters:
t The tag to be converted
Returns:
0 on success or one of the following errors
  • MP_EVERSION - Function isn't able to handle a tag of this version

Definition at line 819 of file mplib.c.

int mp_convert_to_v2 id3_tag t  ) 
 

Converts a tag to id3v2 tag format.

Parameters:
t The tag to be converted
Returns:
0 on success or one of the following errors
  • MP_EVERSION - Function isn't able to handle a tag of this version

Definition at line 764 of file mplib.c.

int mp_del_tags_by_ver_from_fd int  fd,
int  version
 

Deletes all tags in file with the specified version.

Parameters:
fd The file descriptor
version Version of the tag that should be deleted
Returns:
0 on success

Definition at line 749 of file mplib.c.

int mp_del_tags_by_ver_from_file const char *  path,
int  version
 

Deletes all tags in file with the specified version.

Parameters:
path The filename
version Version of the tag that should be deleted
Returns:
0 on success

Definition at line 734 of file mplib.c.

int mp_del_tags_from_fd int  fd  ) 
 

Deletes all tags in file.

Parameters:
fd The file descriptor
Returns:
0 on success

Definition at line 723 of file mplib.c.

int mp_del_tags_from_file const char *  path  ) 
 

Deletes all tags in file.

Parameters:
path The filename
Returns:
0 on success

Definition at line 708 of file mplib.c.

void mp_free_comment_content id3_comment_content  ) 
 

Frees a comment struct.

Definition at line 1041 of file mplib.c.

void mp_free_content id3_content  ) 
 

Frees a content struct.

Definition at line 1025 of file mplib.c.

void mp_free_list id3_tag_list  ) 
 

Frees a tag list beginning with the given element XXX.

Definition at line 946 of file mplib.c.

void mp_free_tag id3_tag t  ) 
 

Frees tag struct.

Parameters:
t the tag to free

Definition at line 1009 of file mplib.c.

void mp_free_text_content id3_text_content  ) 
 

Frees a text struct.

Definition at line 1033 of file mplib.c.

id3_content* mp_get_content const id3_tag t,
int  f
 

Gets the first content found of a specified field in the given tag and allocates a struct.

Parameters:
t The tag
f The fields identifier
Returns:
The new allocated content for the specified field or NULL On NULL: errno set to the following values
  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFNF - Field does not exists in tag /invalid identifier
  • MP_EVERSION - Tag has a version set that is not supported by the library

Definition at line 314 of file mplib.c.

id3_content* mp_get_content_at_pos const id3_tag t,
int  f,
int  pos
 

It's posible that a tag has multiple ocurances of a field, use this function to get a specified field by position.

The first ocurance of the field in the tag is 0. e.g.: To get the third comment in an id3v2 tag use mp_get_content_at_pos(tag, MP_COMMENT, 2);

Parameters:
t The tag
f The fields identifier
pos The content position in the tag
Returns:
See also:
mp_get_content()

Definition at line 320 of file mplib.c.

id3_content* mp_get_content_custom const id3_tag t,
const char *  f
 

Gets a custom fields content and allocates a struct.

This function can only be applied to ID3v2 tags. It will lookup a by the given identifier and return its content.

Parameters:
t The tag
f The field names identifier e.g. ENCR
Returns:
See also:
mp_get_content()

Definition at line 374 of file mplib.c.

id3_content* mp_get_content_custom_at_pos const id3_tag t,
const char *  f,
int  pos
 

See mp_get_content_at_pos() and mp_get_content_custom().

Parameters:
t The tag
f The field names identifier e.g. ENCR
pos The content position in the tag
Returns:
See also:
mp_get_content()

Definition at line 392 of file mplib.c.

mpeg_header* mp_get_mpeg_header_from_fd int  fd  ) 
 

Gets the header structure from a file descriptor.

Parameters:
fd The file descriptor
Returns:
A pointer to a new initialized header structure - NULL on IO Error

Definition at line 88 of file mplib.c.

mpeg_header* mp_get_mpeg_header_from_file const char *  path  ) 
 

Allocates a MPEG header structure from a file.

Parameters:
path The filename
Returns:
A pointer to a new initialized header structure - NULL on IO Error

Definition at line 71 of file mplib.c.

char* mp_get_str_bitrate const mpeg_header  ) 
 

Allocates a label with the appropriate header field value as a string.

Definition at line 142 of file mplib.c.

char* mp_get_str_layer const mpeg_header  ) 
 

Allocates a label with the appropriate header field value as a string.

Definition at line 130 of file mplib.c.

char* mp_get_str_mode const mpeg_header  ) 
 

Allocates a label with the appropriate header field value as a string.

Definition at line 208 of file mplib.c.

char* mp_get_str_samplingfreq const mpeg_header  ) 
 

Allocates a label with the appropriate header field value as a string.

Definition at line 183 of file mplib.c.

char* mp_get_str_version const mpeg_header  ) 
 

Allocates a label with the appropriate header field value as a string.

Definition at line 124 of file mplib.c.

id3_tag_list* mp_get_tag_list size_t(*)(void *, size_t, void *)  read_func,
off_t(*)(off_t, int, void *)  lseek_func,
void *  arg
 

Allocates and fills a list of tags using read and seek wrapper functions.

Parameters:
read_func Pointer to function that reads
lseek_func Pointer to function that seeks
arg Pointer to argument for read and seek wrapper functions
Returns:
A pointer to a initialized list struct or null if no tags have been found

Definition at line 259 of file mplib.c.

id3_tag_list* mp_get_tag_list_from_fd int  fd  ) 
 

Allocates and fills a list of tags found in the given file.

This list will contain at least one and at most two tags or is NULL if no tags have been found. This function prepares argument and calls mp_get_tag_list() function.

Parameters:
fd The file descriptor
Returns:
A pointer to a initialized list struct or null if no tags have been found

Definition at line 250 of file mplib.c.

id3_tag_list* mp_get_tag_list_from_file const char *  path  ) 
 

Allocates and fills a list of tags found in the given file.

This list will contain at least one and at most two tags or is NULL if no tags have been found. This function prepares argument and calls mp_get_tag_list() function.

Parameters:
path The files name to search for tags
Returns:
A pointer to a initialized list struct or null if no tags have been found

Definition at line 233 of file mplib.c.

id3_tag_list* mp_get_tag_list_from_mem void *  buf,
size_t  s
 

Allocates and fills a list of tags found in the given memory buffer.

This list will contain at least one and at most two tags or is NULL if no tags have been found. This function prepares argument and calls mp_get_tag_list() function.

Parameters:
buf Pointer to buffer to search for tags
s Size of the buffer
Returns:
A pointer to a initialized list struct or null if no tags have been found

Definition at line 221 of file mplib.c.

int mp_is_valid_v1_value int  field,
char *  value
 

Checks wether the given value would be a valid v1 field.

Parameters:
field The field
value The value
Returns:
0 if test failed

Definition at line 909 of file mplib.c.

id3_text_content* mp_parse_album const id3_content content  ) 
 

Parses the album field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 75 of file mplib_paas.c.

id3_text_content* mp_parse_artist const id3_content content  ) 
 

Parses the artist field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 63 of file mplib_paas.c.

id3_comment_content* mp_parse_comment const id3_content content  ) 
 

Parses the comment field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 99 of file mplib_paas.c.

id3_text_content* mp_parse_genre const id3_content content  ) 
 

Parses the genre field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 87 of file mplib_paas.c.

id3_text_content* mp_parse_text const id3_content content  ) 
 

Generic function for parsing text fields.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 162 of file mplib_paas.c.

id3_text_content* mp_parse_title const id3_content content  ) 
 

Parses the title field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 69 of file mplib_paas.c.

id3_text_content* mp_parse_track const id3_content content  ) 
 

Parses the track field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 93 of file mplib_paas.c.

id3_text_content* mp_parse_year const id3_content content  ) 
 

Parses the year field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 81 of file mplib_paas.c.

int mp_set_content id3_tag t,
int  field,
id3_content content
 

Copys the value of a specified field into the given tag.

The content argument may be freed after using this function. The way a content is represented in a tag depends from the tags version and kind of field. I.e. it may be nessecary to represent a track number as a binary value in a v1 tag or to embeded it into a frame for a v2 tag. The caller just needs to give the correct identifier with the value as a id3_content and to take care of freeing the id3_content value afterwards.

Parameters:
t The tag to edit
field The fields identifier
content The fields new content
Returns:
0 success or one of the following errors
  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFNF - Field does not exists in tag /invalid identifier
  • MP_EVERSION - Function isn't able to handle a tag of this version

Definition at line 415 of file mplib.c.

int mp_set_content_at_pos id3_tag t,
int  field,
id3_content content,
int  pos
 

Copys the value of a specified field into the given tag.

This function allows to specify a certain frame position.

See also:
mp_set_content(id3_tag* t, int field, id3_content* content)
Parameters:
t The tag to edit
field The fields identifier
content The fields new content
pos The frame position that should be used
Returns:
0 success or one of the following errors
  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFNF - Field does not exists in tag /invalid identifier
  • MP_EVERSION - Function isn't able to handle a tag of this version

Definition at line 527 of file mplib.c.

int mp_set_custom_content id3_tag t,
char *  field,
id3_content content
 

Sets up a new custom field with the given value.

Parameters:
t The tag to edit
field The new fields name - A four chars upper case identifier e.g. ENCR
content The fields new content
Returns:
See mp_set_content

Definition at line 550 of file mplib.c.

int mp_set_custom_content_at_pos id3_tag t,
char *  field,
id3_content content,
int  pos
 

Sets up a new custom field with the given value on a certain frame position.

Parameters:
t The tag to edit
field The new fields name - A four chars upper case identifier e.g. ENCR
content The fields new content
pos The frame position that should be used
Returns:
See mp_set_content

Definition at line 556 of file mplib.c.

int mp_write_to_fd const id3_tag_list ls,
int  fd
 

Writes the tag to the specified file.

Parameters:
ls The tag list to be added to file - may be NULL for deleting all tags
fd The file descriptor
Returns:
0 on success or one of the following errors
  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EVERSION - Function isn't able to handle a tag of this version

Definition at line 628 of file mplib.c.

int mp_write_to_file const id3_tag_list ls,
const char *  path
 

Writes the tag to the specified file.

Parameters:
ls The tag list to be added to file - may be NULL for deleting all tags
path The filename
Returns:
0 on success or one of the following errors
  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EVERSION - Function isn't able to handle a tag of this version

Definition at line 611 of file mplib.c.