MP4v2
itmf_tags.h
1#ifndef MP4V2_ITMF_TAGS_H
2#define MP4V2_ITMF_TAGS_H
3
4/**************************************************************************/
58{
59 MP4_ART_UNDEFINED = 0,
60 MP4_ART_BMP = 1,
61 MP4_ART_GIF = 2,
62 MP4_ART_JPEG = 3,
63 MP4_ART_PNG = 4
65
67typedef struct MP4TagArtwork_s
68{
69 void* data;
70 uint32_t size;
73
74typedef struct MP4TagTrack_s
75{
76 uint16_t index;
77 uint16_t total;
79
80typedef struct MP4TagDisk_s
81{
82 uint16_t index;
83 uint16_t total;
85
98typedef struct MP4Tags_s
99{
100 void* __handle; /* internal use only */
101
102 const char* name;
103 const char* artist;
104 const char* albumArtist;
105 const char* album;
106 const char* grouping;
107 const char* composer;
108 const char* comments;
109 const char* genre;
110 const uint16_t* genreType;
111 const char* releaseDate;
112 const MP4TagTrack* track;
113 const MP4TagDisk* disk;
114 const uint16_t* tempo;
115 const uint8_t* compilation;
116
117 const char* tvShow;
118 const char* tvNetwork;
119 const char* tvEpisodeID;
120 const uint32_t* tvSeason;
121 const uint32_t* tvEpisode;
122
123 const char* description;
124 const char* longDescription;
125 const char* lyrics;
126
127 const char* sortName;
128 const char* sortArtist;
129 const char* sortAlbumArtist;
130 const char* sortAlbum;
131 const char* sortComposer;
132 const char* sortTVShow;
133
134 const MP4TagArtwork* artwork;
135 uint32_t artworkCount;
136
137 const char* copyright;
138 const char* encodingTool;
139 const char* encodedBy;
140 const char* purchaseDate;
141
142 const uint8_t* podcast;
143 const char* keywords; /* TODO: Needs testing */
144 const char* category;
145
146 const uint8_t* hdVideo;
147 const uint8_t* mediaType;
148 const uint8_t* contentRating;
149 const uint8_t* gapless;
150
151 const char* iTunesAccount;
152 const uint8_t* iTunesAccountType;
153 const uint32_t* iTunesCountry;
154 const uint32_t* contentID;
155 const uint32_t* artistID;
156 const uint64_t* playlistID;
157 const uint32_t* genreID;
158 const uint32_t* composerID;
159 const char* xid;
161
171MP4V2_EXPORT
172const MP4Tags* MP4TagsAlloc( void );
173
184MP4V2_EXPORT
186 const MP4Tags* tags,
187 MP4FileHandle hFile );
188
200MP4V2_EXPORT
202 const MP4Tags* tags,
203 MP4FileHandle hFile );
204
211MP4V2_EXPORT
213 const MP4Tags* tags );
214
229MP4V2_EXPORT
231 const MP4Tags* tags,
232 bool* hasMetadata );
233
234MP4V2_EXPORT bool MP4TagsSetName ( const MP4Tags*, const char* );
235MP4V2_EXPORT bool MP4TagsSetArtist ( const MP4Tags*, const char* );
236MP4V2_EXPORT bool MP4TagsSetAlbumArtist ( const MP4Tags*, const char* );
237MP4V2_EXPORT bool MP4TagsSetAlbum ( const MP4Tags*, const char* );
238MP4V2_EXPORT bool MP4TagsSetGrouping ( const MP4Tags*, const char* );
239MP4V2_EXPORT bool MP4TagsSetComposer ( const MP4Tags*, const char* );
240MP4V2_EXPORT bool MP4TagsSetComments ( const MP4Tags*, const char* );
241MP4V2_EXPORT bool MP4TagsSetGenre ( const MP4Tags*, const char* );
242MP4V2_EXPORT bool MP4TagsSetGenreType ( const MP4Tags*, const uint16_t* );
243MP4V2_EXPORT bool MP4TagsSetReleaseDate ( const MP4Tags*, const char* );
244MP4V2_EXPORT bool MP4TagsSetTrack ( const MP4Tags*, const MP4TagTrack* );
245MP4V2_EXPORT bool MP4TagsSetDisk ( const MP4Tags*, const MP4TagDisk* );
246MP4V2_EXPORT bool MP4TagsSetTempo ( const MP4Tags*, const uint16_t* );
247MP4V2_EXPORT bool MP4TagsSetCompilation ( const MP4Tags*, const uint8_t* );
248
249MP4V2_EXPORT bool MP4TagsSetTVShow ( const MP4Tags*, const char* );
250MP4V2_EXPORT bool MP4TagsSetTVNetwork ( const MP4Tags*, const char* );
251MP4V2_EXPORT bool MP4TagsSetTVEpisodeID ( const MP4Tags*, const char* );
252MP4V2_EXPORT bool MP4TagsSetTVSeason ( const MP4Tags*, const uint32_t* );
253MP4V2_EXPORT bool MP4TagsSetTVEpisode ( const MP4Tags*, const uint32_t* );
254
255MP4V2_EXPORT bool MP4TagsSetDescription ( const MP4Tags*, const char* );
256MP4V2_EXPORT bool MP4TagsSetLongDescription ( const MP4Tags*, const char* );
257MP4V2_EXPORT bool MP4TagsSetLyrics ( const MP4Tags*, const char* );
258
259MP4V2_EXPORT bool MP4TagsSetSortName ( const MP4Tags*, const char* );
260MP4V2_EXPORT bool MP4TagsSetSortArtist ( const MP4Tags*, const char* );
261MP4V2_EXPORT bool MP4TagsSetSortAlbumArtist ( const MP4Tags*, const char* );
262MP4V2_EXPORT bool MP4TagsSetSortAlbum ( const MP4Tags*, const char* );
263MP4V2_EXPORT bool MP4TagsSetSortComposer ( const MP4Tags*, const char* );
264MP4V2_EXPORT bool MP4TagsSetSortTVShow ( const MP4Tags*, const char* );
265
266MP4V2_EXPORT bool MP4TagsAddArtwork ( const MP4Tags*, MP4TagArtwork* );
267MP4V2_EXPORT bool MP4TagsSetArtwork ( const MP4Tags*, uint32_t, MP4TagArtwork* );
268MP4V2_EXPORT bool MP4TagsRemoveArtwork ( const MP4Tags*, uint32_t );
269
270MP4V2_EXPORT bool MP4TagsSetCopyright ( const MP4Tags*, const char* );
271MP4V2_EXPORT bool MP4TagsSetEncodingTool ( const MP4Tags*, const char* );
272MP4V2_EXPORT bool MP4TagsSetEncodedBy ( const MP4Tags*, const char* );
273MP4V2_EXPORT bool MP4TagsSetPurchaseDate ( const MP4Tags*, const char* );
274
275MP4V2_EXPORT bool MP4TagsSetPodcast ( const MP4Tags*, const uint8_t* );
276MP4V2_EXPORT bool MP4TagsSetKeywords ( const MP4Tags*, const char* );
277MP4V2_EXPORT bool MP4TagsSetCategory ( const MP4Tags*, const char* );
278
279MP4V2_EXPORT bool MP4TagsSetHDVideo ( const MP4Tags*, const uint8_t* );
280MP4V2_EXPORT bool MP4TagsSetMediaType ( const MP4Tags*, const uint8_t* );
281MP4V2_EXPORT bool MP4TagsSetContentRating ( const MP4Tags*, const uint8_t* );
282MP4V2_EXPORT bool MP4TagsSetGapless ( const MP4Tags*, const uint8_t* );
283
284MP4V2_EXPORT bool MP4TagsSetITunesAccount ( const MP4Tags*, const char* );
285MP4V2_EXPORT bool MP4TagsSetITunesAccountType ( const MP4Tags*, const uint8_t* );
286MP4V2_EXPORT bool MP4TagsSetITunesCountry ( const MP4Tags*, const uint32_t* );
287MP4V2_EXPORT bool MP4TagsSetContentID ( const MP4Tags*, const uint32_t* );
288MP4V2_EXPORT bool MP4TagsSetArtistID ( const MP4Tags*, const uint32_t* );
289MP4V2_EXPORT bool MP4TagsSetPlaylistID ( const MP4Tags*, const uint64_t* );
290MP4V2_EXPORT bool MP4TagsSetGenreID ( const MP4Tags*, const uint32_t* );
291MP4V2_EXPORT bool MP4TagsSetComposerID ( const MP4Tags*, const uint32_t* );
292MP4V2_EXPORT bool MP4TagsSetXID ( const MP4Tags*, const char* );
293
296#endif /* MP4V2_ITMF_TAGS_H */
struct MP4TagArtwork_s MP4TagArtwork
Data object representing a single piece of artwork.
MP4TagArtworkType_e
Enumeration of possible MP4TagArtwork::type values.
Definition: itmf_tags.h:58
bool MP4TagsStore(const MP4Tags *tags, MP4FileHandle hFile)
Store data to mp4 file from structure.
const MP4Tags * MP4TagsAlloc(void)
Allocate tags convenience structure for reading and settings tags.
enum MP4TagArtworkType_e MP4TagArtworkType
Enumeration of possible MP4TagArtwork::type values.
bool MP4TagsHasMetadata(const MP4Tags *tags, bool *hasMetadata)
Accessor that indicates whether a tags structure contains any metadata.
void MP4TagsFree(const MP4Tags *tags)
Free tags convenience structure.
bool MP4TagsFetch(const MP4Tags *tags, MP4FileHandle hFile)
Fetch data from mp4 file and populate structure.
struct MP4Tags_s MP4Tags
Tags convenience structure.
Data object representing a single piece of artwork.
Definition: itmf_tags.h:68
uint32_t size
data size in bytes
Definition: itmf_tags.h:70
MP4TagArtworkType type
data type
Definition: itmf_tags.h:71
void * data
raw picture data
Definition: itmf_tags.h:69
Definition: itmf_tags.h:81
Definition: itmf_tags.h:75
Tags convenience structure.
Definition: itmf_tags.h:99