Tag Parser  6.2.2
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
mp4ids.h
Go to the documentation of this file.
1 #ifndef MP4TAGATOMNAMES_H
2 #define MP4TAGATOMNAMES_H
3 
4 #include "../global.h"
5 
6 #include <c++utilities/conversion/types.h>
7 
8 namespace Media
9 {
10 
11 class MediaFormat;
12 
13 namespace Mp4AtomIds {
14 enum KnownValue : uint32 {
15  AvcConfiguration = 0x61766343,
16  BitrateBox = 0x62747274,
17  CleanAperature = 0x636c6170,
18  ChunkOffset64 = 0x636f3634,
20  Data = 0x64617461,
21  DataInformation = 0x64696e66,
22  DataReference = 0x64726566,
23  Drms = 0x64726D73,
24  Edts = 0x65647473,
25  Edit = 0x656C7374,
26  Free = 0x66726565,
27  FileType = 0x66747970,
28  HandlerReference = 0x68646c72,
29  HintMediaHeader = 0x686D6864,
30  ItunesList = 0x696c7374,
31  MediaData = 0x6d646174,
32  MediaHeader = 0x6d646864,
33  Media = 0x6d646961,
34  Mean = 0x6D65616E,
35  MovieExtendsHeader = 0x6D656864,
36  Meta = 0x6d657461,
37  MovieFragmentHeader = 0x6D666864,
39  MediaInformation = 0x6d696e66,
40  MovieFragment = 0x6d6f6f66,
41  Movie = 0x6d6f6f76,
42  MovieExtends = 0x6D766578,
43  MovieHeader = 0x6D766864,
44  Name = 0x6E616D65,
45  NullMediaHeaderBox = 0x6E6D6864,
46  PaddingBits = 0x70616462,
47  PixalAspectRatio = 0x70617370,
49  SampleToGroup = 0x73626770,
51  SampleGroupDescription = 0x73677064,
52  Skip = 0x736b6970,
53  SoundMediaHeader = 0x736D6864,
54  SampleTable = 0x7374626c,
55  ChunkOffset = 0x7374636f,
56  DegradationPriority = 0x73746470,
57  SampleToChunk = 0x73747363,
58  SampleDescription = 0x73747364,
59  ShadowSyncSample = 0x73747368,
60  SyncSample = 0x73747373,
61  SampleSize = 0x7374737A,
62  DecodingTimeToSample = 0x73747473,
63  CompactSampleSize = 0x73747a32,
64  SubSampleInformation = 0x73756273,
65  TrackFragmentHeader = 0x74666864,
66  TrackHeader = 0x746b6864,
67  TrackFragment = 0x74726166,
68  Track = 0x7472616b,
69  TrackReference = 0x74726566,
70  TrackExtends = 0x74726578,
71  TrackFragmentRun = 0x7472756E,
72  UserData = 0x75647461,
73  DataEntryUrl = 0x75726C20,
74  DataEntryUrn = 0x75726E20,
75  VideoMediaHeader = 0x766D6864,
76  Wide = 0x77696465
77 };
78 }
79 
80 namespace Mp4TagAtomIds {
81 enum KnownValue : uint32 {
82  Album = 0xA9616c62,
83  AlbumArtist = 0x61415254,
84  Artist = 0xA9415254,
85  Bpm = 0x746d706f,
86  Category = 0x63617467,
87  Comment = 0xA9636d74,
88  Composer = 0xA9777274,
89  Copyright = 0x63707274,
90  Cover = 0x636f7672,
91  Description = 0x64657363,
92  DiskPosition = 0x6469736b,
93  Encoder = 0xA9746f6f,
94  EpisodeGlobalUniqueId = 0x65676964,
95  Extended = 0x2d2d2d2d,
96  GaplessPlayback = 0x70676170,
97  Genre = 0xA967656e,
98  Grouping = 0xA9677270,
99  Keywords = 0x6b657977,
100  Lyricist = 0xA9737766,
101  Lyrics = 0xA96c7972,
102  MediaType = 0x7374696B,
103  Performers = 0xA9707266,
104  Podcast = 0x70637374,
105  PodcastUrl = 0x7075726c,
106  PreDefinedGenre = 0x676e7265,
107  Producer = 0xA9707264,
108  PurchaseDate = 0x70757264,
109  Rating = 0x72746e67,
110  RecordLabel = 0xA96c6162,
111  Title = 0xA96e616d,
112  TrackPosition = 0x74726b6e,
113  TvEpisode = 0x74766573,
114  TvEpisodeName = 0x7476656e,
115  TvNetworkName = 0x74766e6e,
116  TvSeason = 0x7476736e,
117  TvShowName = 0x74767368,
118  Year = 0xA9646179
119 };
120 }
121 
122 namespace Mp4TagExtendedMeanIds {
123 extern const char *iTunes;
124 }
125 
126 namespace Mp4TagExtendedNameIds {
127 extern const char *cdec;
128 extern const char *label;
129 }
130 
131 namespace Mp4MediaTypeIds {
132 enum KnownValue : uint32 {
133  Sound = 0x736f756e,
134  Video = 0x76696465,
135  Hint = 0x68696e74,
136  Meta = 0x6d657461
137 };
138 }
139 
140 namespace FourccIds {
141 enum KnownValue : uint32 {
142  Ac3 = 0x61632d33,
143  Ac4 = 0x61632d34,
144  AdpcmAcm = 0x6D730002,
145  Agsm = 0x6167736D,
146  Alac = 0x616C6163,
147  Alaw = 0x616C6177,
148  Alaw21 = 0x616C6177,
149  AlphaCompositor = 0x626C6E64,
150  AlphaGain = 0x6761696E,
151  Amr = 0x73617762,
152  AmrNarrowband = 0x73616D72,
153  Animation = 0x726C6520,
154  Appl1 = 0x6476690,
155  Appl2 = 0x6C70630,
156  Apple16BitGray = 0x62313667,
158  Apple48BitRgb = 0x62343872,
159  Apple64BitArgb1 = 0x62363461,
160  Apple64BitArgb2 = 0x62617365,
161  Apple64BitArgb3 = 0x626C6974,
162  AppleAnimation = 0x726C6520,
163  AppleAvrJpeg = 0x61767220,
164  AppleBmp = 0x57524C45,
165  AppleCinepak = 0x63766964,
166  AppleCmyk = 0x636D796B,
168  AppleCurve = 0x70617468,
169  AppleDvc = 0x64766320,
170  AppleDvcpro = 0x64767070,
171  AppleDvcpro501 = 0x6476356E,
172  AppleDvcpro502 = 0x64763570,
173  AppleDvcpro50Ntsc = 0x6476356E,
174  AppleDvcpro50Pal = 0x64763570,
175  AppleDvcproPal = 0x64767070,
176  AppleDvDvcproNtsc = 0x6476630,
177  AppleDvp = 0x64766370,
178  AppleDvPal = 0x64766370,
179  AppleFlc = 0x666C6963,
180  AppleGif = 0x67696620,
181  AppleGraphics = 0x736D630,
182  AppleGsm101 = 0x6167736D,
183  AppleH261 = 0x68323631,
185  AppleLossless = 0x616C6163,
186  AppleMacpaint = 0x504E5447,
187  AppleMicrosoftVideo1 = 0x6D737663,
188  AppleMotionJpegA = 0x6D6A7061,
189  AppleMotionJpegB = 0x6D6A7062,
190  AppleMpeg4Compressor = 0x6D703476,
192  AppleOpendmlJpeg = 0x646D6231,
193  ApplePhotoCd = 0x6B706364,
194  ApplePhotoJpeg = 0x6A706567,
195  ApplePixletVideo = 0x70786C74,
196  ApplePlanarRgb = 0x38425053,
197  ApplePng = 0x706E670,
198  AppleQuickdraw = 0x71647277,
199  AppleR408 = 0x72343038,
200  AppleScalingCodec = 0x7363616C,
201  AppleSgi = 0x2E534749,
203  AppleTextAtsuiCodec = 0x74657874,
204  AppleTga = 0x7467610,
205  AppleTiff = 0x74696666,
206  AppleV408 = 0x76343038,
207  AppleVcH263 = 0x68323633,
208  AppleVideo = 0x72707A61,
209  AppleYuv420Codec1 = 0x6A343230,
210  AppleYuv420Codec2 = 0x6D797576,
211  AppleYuv420Codec3 = 0x79343230,
212  AppleYuv422Codec2Vuy = 0x32767579,
213  AppleYuv422Codec4 = 0x79757678,
214  AppleYuv422CodecYuvs = 0x79757673,
215  AppleYuv422CodecYuvu = 0x79757675,
216  Avc0Media = 0x64726D69,
217  Avc1 = 0x61766331,
218  Avc2 = 0x61766332,
219  Avc3 = 0x61766333,
220  Avc4 = 0x61766334,
221  Blur = 0x626C7572,
222  Bps8 = 0x38627073,
223  BrightnessAndContrast = 0x6272636F,
224  ChannelCompositor = 0x6368616E,
225  ChromaKey = 0x636B6579,
226  Cinepak = 0x63766964,
227  Cloud = 0x636C6F75,
228  ColorStyle = 0x736F6C72,
229  Colorsync = 0x73796E63,
230  ColorTint = 0x74696E74,
231  CrossFade = 0x64736C76,
232  Cvid = 0x63766964,
233  Divx3Decoder1 = 0x41503431,
234  Divx3Decoder2 = 0x434F4C30,
235  Divx3Decoder3 = 0x434F4C31,
236  Divx3Decoder4 = 0x44495633,
237  Divx3Decoder5 = 0x44495634,
238  Divx3Decoder6 = 0x44495635,
239  Divx3Decoder7 = 0x44495636,
240  Divx3Decoder8 = 0x4D504733,
241  Divx3Decoder9 = 0x6D706733,
242  Divx3Decoder10 = 0x636F6C30,
243  Divx3Decoder11 = 0x636F6C31,
244  Divx3Decoder12 = 0x64697633,
245  Divx3Decoder13 = 0x64697634,
246  Divx3Decoder14 = 0x64697635,
247  Divx3Decoder15 = 0x64697636,
248  Divx4Decoder1 = 0x44495658,
249  Divx4Decoder2 = 0x64697678,
250  Divx5Decoder = 0x44583530,
251  Drms = 0x64726D73,
252  Drmi = 0x64726D69,
253  Dts = 0x6474736C,
254  DtsH = 0x64747368,
255  DtsE = 0x64747365,
256  Dvca = 0x64766361,
257  DvcPro501 = 0x64763570,
258  DvcPro502 = 0x6476356E,
259  DvcProPal = 0x64767070,
260  EAc3 = 0x65632D33,
261  EdgeDetection = 0x65646765,
262  Emboss = 0x656D6273,
263  Explode = 0x78706C6F,
264  FilmNoise = 0x666D6E73,
265  Fire = 0x66697265,
266  FlashPixImage = 0x66706978,
268  FloatingPoint32Bit = 0x666C3332,
269  FloatingPoint64Bit = 0x666C3634,
270  GeneralConvolution = 0x67656E6B,
271  Gif = 0x67696620,
272  Glass = 0x676C6173,
273  GradientWipe = 0x6D617474,
274  Graphics = 0x736D6320,
275  H263Quicktime = 0x68323633,
276  H2633GPP = 0x73323633,
277  H264Decoder1 = 0x44415643,
278  H264Decoder2 = 0x48323634,
279  H264Decoder3 = 0x56535348,
280  H264Decoder4 = 0x58323634,
281  H264Decoder5 = 0x68323634,
282  H264Decoder6 = 0x78323634,
283  Hdv3 = 0x68647633,
284  Hevc1 = 0x68766331,
285  Hevc2 = 0x68657631,
286  HslBalance = 0x68736C62,
287  Ima4 = 0x696D6134,
288  Ima41 = 0x696D6134,
289  ImaadpcmAcm = 0x6D730011,
290  Implode = 0x6D706C6F,
291  Int16Be = 0x74776F73,
292  Int16Le = 0x736F7774,
293  Int24 = 0x696E3234,
294  Int32 = 0x696E3332,
295  Iris = 0x736D7032,
296  IvxDecoder1 = 0x33495632,
297  IvxDecoder2 = 0x33495644,
298  IvxDecoder3 = 0x33697632,
299  IvxDecoder4 = 0x33697664,
300  Jpeg = 0x6a706567,
301  Jpeg2000Decoder = 0x6D6A7032,
302  Law21 = 0x756C6177,
303  LensFlare = 0x6C656E73,
304  Lle = 0x726C6520,
305  Mac3 = 0x6D616333,
306  Mac6 = 0x6D616336,
307  Mace31 = 0x4D414333,
308  Mace61 = 0x4D414336,
309  MatrixWipe = 0x736D7034,
310  DolbyMpl = 0x6D6C7061,
311  MotionJpegA = 0x6D6A7061,
312  MotionJpegB = 0x6D6A7062,
313  Mp3 = 0x2e6d7033,
314  Mp3CbrOnly = 0x6D730055,
315  Mpeg = 0x4D504547,
316  Mpeg2Imx30 = 0x6D78336E,
317  Mpeg2Imx50 = 0x6D783570,
318  Mpeg4Audio = 0x6d703461,
319  Mpeg4Decoder1 = 0x464D5034,
320  Mpeg4Decoder2 = 0x53454447,
321  Mpeg4Decoder3 = 0x57563146,
322  Mpeg4Sample = 0x6d703473,
323  Mpeg4TimedText = 0x74783367,
324  Mpeg4Video = 0x6d703476,
325  MsMpeg4V1Decoder1 = 0x44495631,
326  MsMpeg4V1Decoder2 = 0x64697631,
327  MsMpeg4V1Decoder3 = 0x4D504734,
328  MsMpeg4V1Decoder4 = 0x6D706734,
329  MsMpeg4V1Decoder5 = 0x4D504731,
330  MsMpeg4V1Decoder6 = 0x6D706731,
331  MsMpeg4V2Decoder1 = 0x44495632,
332  MsMpeg4V2Decoder2 = 0x64697632,
333  MsMpeg4V2Decoder3 = 0x4D503432,
334  MsMpeg4V2Decoder4 = 0x6D703432,
335  MsMpeg4V3Decoder1 = 0x4D503433,
336  MsMpeg4V3Decoder2 = 0x6D703433,
337  NtscDv25Video = 0x64766320,
338  Oggs = 0x4F676753,
339  PalDv25Video = 0x64766370,
340  PdfImage = 0x70646620,
341  Png = 0x706E6720,
342  Push = 0x70757368,
343  Qclp = 0x51636C70,
344  QdesignMusic1Decoder = 0x51444D43,
345  QdesignMusic2 = 0x51444D32,
346  Qdmc = 0x51444D43,
347  Qdrw = 0x71647277,
348  QtvrCubicCodec = 0x63757061,
349  QtvrCylindricalCodec = 0x6C747061,
350  QualcommPurevoice = 0x51636C70,
351  QualcommQcelp = 0x51636C71,
352  Radial = 0x736D7033,
353  Raw = 0x72617720,
354  RgbBalance = 0x72676262,
355  Ripple = 0x7269706C,
356  Rpza = 0x72707A61,
357  Rv20 = 0x52563230,
358  Rv30 = 0x52563330,
359  Rv40 = 0x52563430,
360  Sharpen = 0x73687270,
361  Slide = 0x736C6964,
362  Smc = 0x736D6320,
363  SorensonH263Decoder = 0x464C5631,
366  Sowt = 0x736F7774,
368  Svq1 = 0x73767131,
369  Svq3 = 0x73767133,
370  Tiff = 0x74696666,
371  TravelingMatte = 0x74726176,
372  TruemotionVp6Decoder1 = 0x56503632,
373  TruemotionVp6Decoder2 = 0x56503646,
374  Twos = 0x74776F73,
375  Ulaw = 0x756C6177,
376  Ulaw21 = 0x756C6177,
377  VcmImageCodec = 0x4D6A7067,
378  Vdva = 0x76647661,
379  WindowsMediaAudio = 0x6F776D61,
380  WindowsMediaAudio7 = 0x574D4131,
383  WindowsMediaVideoV17 = 0x574D5637,
384  WindowsMediaVideoV2 = 0x574D5632,
385  WindowsMediaVideoV8 = 0x574D5638,
386  Wipe = 0x736D7074,
387  WmvImageCodec1 = 0x4D347332,
388  WmvImageCodec2 = 0x4D703432,
389  WmvImageCodec3 = 0x4D703433,
390  WmvImageCodec4 = 0x4D703453,
391  WmvImageCodec5 = 0x574D5631,
392  WmvImageCodec6 = 0x574D5632,
393  WmvImageCodec7 = 0x574D5633,
394  XvidDecoder1 = 0x424C5A30,
395  XvidDecoder2 = 0x58564944,
396  XvidDecoder3 = 0x58564958,
397  XvidDecoder4 = 0x58766944,
398  XvidDecoder5 = 0x78766964,
404  Zoom = 0x7A6F6F6D
405 };
406 
408 
409 }
410 
411 namespace Mp4FormatExtensionIds {
412 enum KnownValue : uint32 {
413  GammaLevel = 0x67616D61,
414  FieldHandling = 0x6669656C,
416  DefaultHuffmanTable = 0x6D6A6874,
419  AvcConfiguration = 0x61766343,
420  PixelAspectRatio = 0x70617370,
421  ColorParameters = 0x636F6C72,
422  CleanAperature = 0x636C6170
423 };
424 }
425 
426 namespace Mpeg4ElementaryStreamObjectIds {
427 enum KnownValue : byte {
431  AfxStream = 0x05,
435  Mpeg4Visual = 0x20,
436  Avc,
438  Als = 0x24,
439  Sa0c = 0x2B,
440  Aac = 0x40,
454  Png,
455  Evrc = 0xA0,
456  Smv,
458  Vc1,
460  Ac3,
461  EAc3,
462  Dts,
466  PrivateEvrc = 0xD1,
467  PrivateAc3 = 0xD3,
469  PrivateOgg = 0xDD,
471  PrivateQcelp = 0xE1
472 };
473 
474 TAG_PARSER_EXPORT MediaFormat streamObjectTypeFormat(byte streamObjectTypeId);
475 
476 }
477 
478 namespace Mpeg4ElementaryStreamTypeIds {
479 enum KnownValue : byte {
493 };
494 
495 TAG_PARSER_EXPORT const char *streamTypeName(byte streamTypeId);
496 
497 }
498 
499 namespace Mpeg4DescriptorIds {
500 enum KnownValue : byte {
501  ObjectDescr = 0x01,
542  UserPrivate = 0xC0
543 };
544 }
545 
546 namespace Mpeg4AudioObjectIds {
547 enum KnownValue : byte {
548  Null = 0,
553  Sbr,
558  Ttsi = 12,
564  ErAacLtp = 19,
574  Ps,
581  Als,
582  Sls,
590 };
591 
592 TAG_PARSER_EXPORT MediaFormat idToMediaFormat(byte mpeg4AudioObjectId, bool sbrPresent = false, bool psPresent = false);
593 
594 }
595 
596 extern uint32 mpeg4SamplingFrequencyTable[13];
597 
598 namespace Mpeg4ChannelConfigs {
600 {
609 };
610 
611 TAG_PARSER_EXPORT const char *channelConfigString(byte config);
612 TAG_PARSER_EXPORT byte channelCount(byte config);
613 
614 }
615 
616 namespace Mpeg4VideoCodes {
617 enum KnownValue : byte {
626  VopStart = 0xB6,
637 };
638 }
639 
640 namespace Mpeg2VideoCodes {
641 enum KnownValue : byte {
642  Pic = 0x00,
643  Seq = 0xB3,
644  Ext = 0xB5,
645  Gop = 0xB8
646 };
647 }
648 
652 enum class Mp4TagMediaType : byte {
653  Movie = 0,
654  Music = 1,
655  Audiobook = 2,
656  MusicVideo = 6,
657  Movie2 = 9,
658  TvShow = 10,
659  Booklet = 11,
660  Ringtone = 14
661 };
662 
666 enum class Mp4TagContentRating : byte {
667  None = 0,
668  Clean = 2,
669  Explicit = 4
670 };
671 
675 enum class AccountType : byte
676 {
677  Itunes = 0,
678  Aol = 1,
679  Undefined = 255
680 };
681 
685 enum class CountryCode
686 {
687  Usa = 143441,
688  Fra = 143442,
689  Deu = 143443,
690  Gbr = 143444,
691  Aut = 143445,
692  Bel = 143446,
693  Fin = 143447,
694  Grc = 143448,
695  Irl = 143449,
696  Ita = 143450,
697  Lux = 143451,
698  Nld = 143452,
699  Prt = 143453,
700  Esp = 143454,
701  Can = 143455,
702  Swe = 143456,
703  Nor = 143457,
704  Dnk = 143458,
705  Che = 143459,
706  Aus = 143460,
707  Nzl = 143461,
708  Jpn = 143462,
709  Undefined = 0
710 };
711 
712 }
713 
714 #endif // MP4TAGATOMNAMES_H
MediaType
The MediaType enum specifies the type of media data (audio, video, text, ...).
Definition: mediaformat.h:13
TAG_PARSER_EXPORT const char * streamTypeName(byte streamTypeId)
Returns the name of the stream type denoted by the specified MPEG-4 stream type ID.
Definition: mp4ids.cpp:217
CountryCode
Specifies the country.
Definition: mp4ids.h:685
uint32 mpeg4SamplingFrequencyTable[13]
Definition: mp4ids.cpp:302
TAG_PARSER_EXPORT const char * channelConfigString(byte config)
Returns the string representation for the specified MPEG-4 channel config.
Definition: mp4ids.cpp:315
The AvcConfiguration struct provides a parser for AVC configuration.
TAG_PARSER_EXPORT MediaFormat fourccToMediaFormat(uint32 fourccId)
Definition: mp4ids.cpp:46
TAG_PARSER_EXPORT MediaFormat streamObjectTypeFormat(byte streamObjectTypeId)
Returns the Media::MediaFormat denoted by the specified MPEG-4 stream ID.
Definition: mp4ids.cpp:154
TAG_PARSER_EXPORT MediaFormat idToMediaFormat(byte mpeg4AudioObjectId, bool sbrPresent=false, bool psPresent=false)
Definition: mp4ids.cpp:245
TAG_PARSER_EXPORT byte channelCount(byte config)
Returns the channel count for the specified MPEG-4 channel config.
Definition: mp4ids.cpp:342
Mp4TagContentRating
Specifies the tag content rating.
Definition: mp4ids.h:666
Mp4TagMediaType
Specifies the tag type.
Definition: mp4ids.h:652
Contains all classes and functions of the TagInfo library.
Definition: exceptions.h:9
AccountType
Specifies the account type.
Definition: mp4ids.h:675
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
The MediaFormat class specifies the format of media data.
Definition: mediaformat.h:257