These routines modify the list of tags internally. The MP4 file is not modified until the mp4tag_write_tags
function is called.
Sets the specified tag to a new value.
mp4tag_set_tag
is used for both string values and binary data values (e.g. 'covr').
When setting binary data, the data argument specifies a file to read to load the binary data. If the application already has the binary data in memory, the mp4tag_set_binary_tag
function should be used.
int mp4tag_set_tag (libmp4tag_t *libmp4tag, const char *tag, const char *data, bool forcebinary)
libmp4tag : The libmp4tag_t
structure returned from mp4tag_open
.
tag : The tag name.
data : The value to set.
forcebinary : If setting a tag with a binary value, and the tag is not currently set, forcebinary should be set to true. Used for custom tags.
Returns: MP4TAG_OK
or other error code.
Available with version 1.2.0.
Used when the binary data is already in the application's memory.
int mp4tag_set_binary_tag (libmp4tag_t *libmp4tag, const char *tag, const char *data, size_t datalen)
libmp4tag : The libmp4tag_t
structure returned from mp4tag_open
.
tag : The tag name.
data : The value to set.
datalen : The length of the data.
Returns: MP4TAG_OK
or other error code.
Delete the specified tag.
int mp4tag_delete_tag (libmp4tag_t *libmp4tag, const char *tag)
libmp4tag : The libmp4tag_t
structure returned from mp4tag_open
.
tag : The name of the tag to delete.
Returns: MP4TAG_OK
or other error code.
Deletes all tags.
int mp4tag_clean_tags (libmp4tag_t *libmp4tag);
libmp4tag : The libmp4tag_t
structure returned from mp4tag_open
.
Returns: MP4TAG_OK
or other error code.