MP4v2

type.h
1
2//
3// The contents of this file are subject to the Mozilla Public License
4// Version 1.1 (the "License"); you may not use this file except in
5// compliance with the License. You may obtain a copy of the License at
6// http://www.mozilla.org/MPL/
7//
8// Software distributed under the License is distributed on an "AS IS"
9// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
10// License for the specific language governing rights and limitations
11// under the License.
12//
13// The Original Code is MP4v2.
14//
15// The Initial Developer of the Original Code is Kona Blend.
16// Portions created by Kona Blend are Copyright (C) 2008.
17// All Rights Reserved.
18//
19// Contributors:
20// Kona Blend, kona8lend@@gmail.com
21// Rouven Wessling, mp4v2@rouvenwessling.de
22//
24
25#ifndef MP4V2_IMPL_ITMF_TYPE_H
26#define MP4V2_IMPL_ITMF_TYPE_H
27
28 namespace mp4v2 { namespace impl { namespace itmf {
29
31
33 enum BasicType {
34 BT_IMPLICIT = 0,
35 BT_UTF8 = 1,
36 BT_UTF16 = 2,
37 BT_SJIS = 3,
38 BT_HTML = 6,
39 BT_XML = 7,
40 BT_UUID = 8,
41 BT_ISRC = 9,
42 BT_MI3P = 10,
43 BT_GIF = 12,
44 BT_JPEG = 13,
45 BT_PNG = 14,
46 BT_URL = 15,
47 BT_DURATION = 16,
48 BT_DATETIME = 17,
49 BT_GENRES = 18,
50 BT_INTEGER = 21,
51 BT_RIAA_PA = 24,
52 BT_UPC = 25,
53 BT_BMP = 27,
54
55 BT_UNDEFINED = 255
56};
57
58 typedef Enum<BasicType,BT_UNDEFINED> EnumBasicType;
59MP4V2_EXPORT extern const EnumBasicType enumBasicType;
60
62
65 enum GenreType {
66 GENRE_UNDEFINED = 0,
67
68 /* ID3v1 standard */
69 GENRE_BLUES = 1,
70 GENRE_CLASSIC_ROCK = 2,
71 GENRE_COUNTRY = 3,
72 GENRE_DANCE = 4,
73 GENRE_DISCO = 5,
74 GENRE_FUNK = 6,
75 GENRE_GRUNGE = 7,
76 GENRE_HIP_HOP = 8,
77 GENRE_JAZZ = 9,
78 GENRE_METAL = 10,
79 GENRE_NEW_AGE = 11,
80 GENRE_OLDIES = 12,
81 GENRE_OTHER = 13,
82 GENRE_POP = 14,
83 GENRE_R_AND_B = 15,
84 GENRE_RAP = 16,
85 GENRE_REGGAE = 17,
86 GENRE_ROCK = 18,
87 GENRE_TECHNO = 19,
88 GENRE_INDUSTRIAL = 20,
89 GENRE_ALTERNATIVE = 21,
90 GENRE_SKA = 22,
91 GENRE_DEATH_METAL = 23,
92 GENRE_PRANKS = 24,
93 GENRE_SOUNDTRACK = 25,
94 GENRE_EURO_TECHNO = 26,
95 GENRE_AMBIENT = 27,
96 GENRE_TRIP_HOP = 28,
97 GENRE_VOCAL = 29,
98 GENRE_JAZZ_FUNK = 30,
99 GENRE_FUSION = 31,
100 GENRE_TRANCE = 32,
101 GENRE_CLASSICAL = 33,
102 GENRE_INSTRUMENTAL = 34,
103 GENRE_ACID = 35,
104 GENRE_HOUSE = 36,
105 GENRE_GAME = 37,
106 GENRE_SOUND_CLIP = 38,
107 GENRE_GOSPEL = 39,
108 GENRE_NOISE = 40,
109 GENRE_ALTERNROCK = 41,
110 GENRE_BASS = 42,
111 GENRE_SOUL = 43,
112 GENRE_PUNK = 44,
113 GENRE_SPACE = 45,
114 GENRE_MEDITATIVE = 46,
115 GENRE_INSTRUMENTAL_POP = 47,
116 GENRE_INSTRUMENTAL_ROCK = 48,
117 GENRE_ETHNIC = 49,
118 GENRE_GOTHIC = 50,
119 GENRE_DARKWAVE = 51,
120 GENRE_TECHNO_INDUSTRIAL = 52,
121 GENRE_ELECTRONIC = 53,
122 GENRE_POP_FOLK = 54,
123 GENRE_EURODANCE = 55,
124 GENRE_DREAM = 56,
125 GENRE_SOUTHERN_ROCK = 57,
126 GENRE_COMEDY = 58,
127 GENRE_CULT = 59,
128 GENRE_GANGSTA = 60,
129 GENRE_TOP_40 = 61,
130 GENRE_CHRISTIAN_RAP = 62,
131 GENRE_POP_FUNK = 63,
132 GENRE_JUNGLE = 64,
133 GENRE_NATIVE_AMERICAN = 65,
134 GENRE_CABARET = 66,
135 GENRE_NEW_WAVE = 67,
136 GENRE_PSYCHEDELIC = 68,
137 GENRE_RAVE = 69,
138 GENRE_SHOWTUNES = 70,
139 GENRE_TRAILER = 71,
140 GENRE_LO_FI = 72,
141 GENRE_TRIBAL = 73,
142 GENRE_ACID_PUNK = 74,
143 GENRE_ACID_JAZZ = 75,
144 GENRE_POLKA = 76,
145 GENRE_RETRO = 77,
146 GENRE_MUSICAL = 78,
147 GENRE_ROCK_AND_ROLL = 79,
148
149 /* Winamp extension */
150 GENRE_HARD_ROCK = 80,
151 GENRE_FOLK = 81,
152 GENRE_FOLK_ROCK = 82,
153 GENRE_NATIONAL_FOLK = 83,
154 GENRE_SWING = 84,
155 GENRE_FAST_FUSION = 85,
156 GENRE_BEBOB = 86,
157 GENRE_LATIN = 87,
158 GENRE_REVIVAL = 88,
159 GENRE_CELTIC = 89,
160 GENRE_BLUEGRASS = 90,
161 GENRE_AVANTGARDE = 91,
162 GENRE_GOTHIC_ROCK = 92,
163 GENRE_PROGRESSIVE_ROCK = 93,
164 GENRE_PSYCHEDELIC_ROCK = 94,
165 GENRE_SYMPHONIC_ROCK = 95,
166 GENRE_SLOW_ROCK = 96,
167 GENRE_BIG_BAND = 97,
168 GENRE_CHORUS = 98,
169 GENRE_EASY_LISTENING = 99,
170 GENRE_ACOUSTIC = 100,
171 GENRE_HUMOUR = 101,
172 GENRE_SPEECH = 102,
173 GENRE_CHANSON = 103,
174 GENRE_OPERA = 104,
175 GENRE_CHAMBER_MUSIC = 105,
176 GENRE_SONATA = 106,
177 GENRE_SYMPHONY = 107,
178 GENRE_BOOTY_BASS = 108,
179 GENRE_PRIMUS = 109,
180 GENRE_PORN_GROOVE = 110,
181 GENRE_SATIRE = 111,
182 GENRE_SLOW_JAM = 112,
183 GENRE_CLUB = 113,
184 GENRE_TANGO = 114,
185 GENRE_SAMBA = 115,
186 GENRE_FOLKLORE = 116,
187 GENRE_BALLAD = 117,
188 GENRE_POWER_BALLAD = 118,
189 GENRE_RHYTHMIC_SOUL = 119,
190 GENRE_FREESTYLE = 120,
191 GENRE_DUET = 121,
192 GENRE_PUNK_ROCK = 122,
193 GENRE_DRUM_SOLO = 123,
194 GENRE_A_CAPELLA = 124,
195 GENRE_EURO_HOUSE = 125,
196 GENRE_DANCE_HALL = 126,
197
198 GENRE_NONE = 255
199};
200
201 typedef Enum<GenreType,GENRE_UNDEFINED> EnumGenreType;
202MP4V2_EXPORT extern const EnumGenreType enumGenreType;
203
205
208 enum StikType {
209 STIK_OLD_MOVIE = 0,
210 STIK_NORMAL = 1,
211 STIK_AUDIOBOOK = 2,
212 STIK_MUSIC_VIDEO = 6,
213 STIK_MOVIE = 9,
214 STIK_TV_SHOW = 10,
215 STIK_BOOKLET = 11,
216 STIK_RINGTONE = 14,
217
218 STIK_UNDEFINED = 255
219};
220
221 typedef Enum<StikType,STIK_UNDEFINED> EnumStikType;
222MP4V2_EXPORT extern const EnumStikType enumStikType;
223
225
228 enum AccountType {
229 AT_ITUNES = 0,
230 AT_AOL = 1,
231
232 AT_UNDEFINED = 255
233};
234
235 typedef Enum<AccountType,AT_UNDEFINED> EnumAccountType;
236MP4V2_EXPORT extern const EnumAccountType enumAccountType;
237
239
242 enum CountryCode {
243 CC_USA = 143441,
244 CC_FRA = 143442,
245 CC_DEU = 143443,
246 CC_GBR = 143444,
247 CC_AUT = 143445,
248 CC_BEL = 143446,
249 CC_FIN = 143447,
250 CC_GRC = 143448,
251 CC_IRL = 143449,
252 CC_ITA = 143450,
253 CC_LUX = 143451,
254 CC_NLD = 143452,
255 CC_PRT = 143453,
256 CC_ESP = 143454,
257 CC_CAN = 143455,
258 CC_SWE = 143456,
259 CC_NOR = 143457,
260 CC_DNK = 143458,
261 CC_CHE = 143459,
262 CC_AUS = 143460,
263 CC_NZL = 143461,
264 CC_JPN = 143462,
265
266 CC_UNDEFINED = 0
267};
268
269 typedef Enum<CountryCode,CC_UNDEFINED> EnumCountryCode;
270MP4V2_EXPORT extern const EnumCountryCode enumCountryCode;
271
273
276 enum ContentRating {
277 CR_NONE = 0,
278 CR_EXPLICIT = 1,
279 CR_CLEAN = 2,
280 CR_EXPLICIT_OLD = 4,
281
282 CR_UNDEFINED = 255
283};
284
285 typedef Enum<ContentRating,CR_UNDEFINED> EnumContentRating;
286MP4V2_EXPORT extern const EnumContentRating enumContentRating;
287
290MP4V2_EXPORT BasicType
291 computeBasicType( const void* buffer, uint32_t size );
292
294
295}}} // namespace mp4v2::impl::itmf
296
297#endif // MP4V2_IMPL_ITMF_TYPE_H
mp4v2::impl::itmf::GenreType
GenreType
enumerated genre as defined in ID3v1 specification but +1 as per iTMF spec.
Definition: type.h:65
mp4v2::impl::itmf::computeBasicType
BasicType computeBasicType(const void *buffer, uint32_t size)
compute BasicType by examining raw bytes header.
mp4v2::impl::itmf::AccountType
AccountType
enumerated 8-bit Account Type used by the iTunes Store.
Definition: type.h:228
mp4v2::impl::itmf::StikType
StikType
enumerated 8-bit Video Type used by iTunes.
Definition: type.h:208
mp4v2::impl::itmf::CountryCode
CountryCode
enumerated 32-bit Country Code used by the iTunes Store.
Definition: type.h:242
mp4v2::impl::itmf::ContentRating
ContentRating
enumerated 8-bit Content Rating used by iTunes.
Definition: type.h:276
mp4v2::impl::itmf::BasicType
BasicType
Basic set of types as detailed in spec.
Definition: type.h:33
mp4v2::impl::itmf::BT_URL
@ BT_URL
absolute, in UTF-8 characters
Definition: type.h:46
mp4v2::impl::itmf::BT_GENRES
@ BT_GENRES
a list of enumerated values, see GenreType
Definition: type.h:49
mp4v2::impl::itmf::BT_UPC
@ BT_UPC
Universal Product Code, in text UTF-8 format (valid as an ID)
Definition: type.h:52
mp4v2::impl::itmf::BT_UTF16
@ BT_UTF16
also known as UTF-16BE
Definition: type.h:36
mp4v2::impl::itmf::BT_SJIS
@ BT_SJIS
deprecated unless it is needed for special Japanese characters
Definition: type.h:37
mp4v2::impl::itmf::BT_HTML
@ BT_HTML
the HTML file header specifies which HTML version
Definition: type.h:38
mp4v2::impl::itmf::BT_UUID
@ BT_UUID
also known as GUID; stored as 16 bytes in binary (valid as an ID)
Definition: type.h:40
mp4v2::impl::itmf::BT_DURATION
@ BT_DURATION
in milliseconds, 32-bit integer
Definition: type.h:47
mp4v2::impl::itmf::BT_ISRC
@ BT_ISRC
stored as UTF-8 text (valid as an ID)
Definition: type.h:41
mp4v2::impl::itmf::BT_BMP
@ BT_BMP
Windows bitmap image.
Definition: type.h:53
mp4v2::impl::itmf::BT_INTEGER
@ BT_INTEGER
a signed big-endian integer with length one of { 1,2,3,4,8 } bytes
Definition: type.h:50
mp4v2::impl::itmf::BT_RIAA_PA
@ BT_RIAA_PA
RIAA parental advisory; { -1=no, 1=yes, 0=unspecified }, 8-bit ingteger.
Definition: type.h:51
mp4v2::impl::itmf::BT_XML
@ BT_XML
the XML header must identify the DTD or schemas
Definition: type.h:39
mp4v2::impl::itmf::BT_MI3P
@ BT_MI3P
stored as UTF-8 text (valid as an ID)
Definition: type.h:42
mp4v2::impl::itmf::BT_JPEG
@ BT_JPEG
a JPEG image
Definition: type.h:44
mp4v2::impl::itmf::BT_GIF
@ BT_GIF
(deprecated) a GIF image
Definition: type.h:43
mp4v2::impl::itmf::BT_UTF8
@ BT_UTF8
without any count or null terminator
Definition: type.h:35
mp4v2::impl::itmf::BT_IMPLICIT
@ BT_IMPLICIT
for use with tags for which no type needs to be indicated
Definition: type.h:34
mp4v2::impl::itmf::BT_PNG
@ BT_PNG
a PNG image
Definition: type.h:45
mp4v2::impl::itmf::BT_DATETIME
@ BT_DATETIME
in UTC, counting seconds since midnight, January 1, 1904; 32 or 64-bits
Definition: type.h:48