typedef struct {
const char *tag;
const char *data;
const char *covername;
size_t datalen;
int dataidx;
int covertype;
bool binary;
} mp4tagpub_t;
The mp4tagpub_t structure is filled in by mp4tag_get_tag_by_name
and mp4tag_iterate
.
tag : The name of the tag.
data : The value of the tag.
covername : If the tag is 'covr', the cover image name may also be returned. If there is no cover image name, or the tag is not 'covr', covername is NULL.
datalen : The size of the value.
dataidx : The index of the cover image or string array. The first item will have a value of zero.
covertype : The type of the cover image. May be MP4TAG_COVER_JPG
or MP4TAG_COVER_PNG
.
binary : If true, the data is in binary format.
Returns the duration in milliseconds.
#include <stdint.h>
int64_t mp4tag_duration (libmp4tag_t *libmp4tag)
libmp4tag : The libmp4tag_t
structure returned from mp4tag_open
.
Returns: duration in milliseconds or 0.
int mp4tag_get_tag_by_name (libmp4tag_t *libmp4tag, const char *tag, mp4tagpub_t *mp4tagpub)
libmp4tag : The libmp4tag_t
structure returned from mp4tag_open
.
tag : The name of the tag to retrieve.
mp4tagpub : A pointer to a mp4tagpub_t
structure to fill in.
Returns: MP4TAG_OK
or other error code.
int mp4tag_iterate_init (libmp4tag_t *libmp4tag)
libmp4tag : The libmp4tag_t
structure returned from mp4tag_open
.
Returns: MP4TAG_OK
or other error code.
int mp4tag_iterate (libmp4tag_t *libmp4tag, mp4tagpub_t *mp4tagpub)
libmp4tag : The libmp4tag_t
structure returned from mp4tag_open
.
mp4tagpub : A pointer to a mp4tagpub_t
structure to fill in.
Returns: MP4TAG_OK
, MP4TAG_FINISH
or other error code.