Tag Parser  6.2.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
id3v2frameids.h
Go to the documentation of this file.
1 #ifndef ID3V2FRAMEIDS_H
2 #define ID3V2FRAMEIDS_H
3 
4 #include <c++utilities/conversion/types.h>
5 
6 #include <string>
7 
8 namespace Media {
9 
10 namespace Id3v2FrameIds {
11 enum KnownValue : uint32 {
12  lAlbum = 0x54414c42,
13  lArtist = 0x54504531,
14  lComment = 0x434f4d4d,
15  lYear = 0x54594552,
16  lRecordDate = 0x54445243,
17  lTitle = 0x54495432,
18  lGenre = 0x54434f4e,
19  lTrackPosition = 0x5452434b,
20  lDiskPosition = 0x54504f53,
21  lEncoder = 0x54454e43,
22  lBpm = 0x5442504d,
23  lCover = 0x41504943,
24  lWriter = 0x54455854,
25  lLength = 0x544c454e,
26  lLanguage = 0x544c414e,
27  lEncoderSettings = 0x54535345,
28  lUnsynchronizedLyrics = 0x55534c54,
29  lSynchronizedLyrics = 0x53594C54,
30  lGrouping = 0x54504532,
31  lRecordLabel = 0x54505542,
32  lUniqueFileId = 0x55464944,
33  lComposer = 0x54434f4d,
34  lRating = 0x504f504d,
35 
36  sAlbum = 0x54414c,
37  sArtist = 0x545031,
38  sComment = 0x434f4d,
39  sYear = 0x545945,
40  sRecordDate = 0x545243,
41  sTitle = 0x545432,
42  sGenre = 0x54434f,
43  sTrackPosition = 0x54524b,
44  sEncoder = 0x54454e,
45  sBpm = 0x544250,
46  sCover = 0x504943,
47  sWriter = 0x545854,
48  sLength = 0x544c45,
49  sLanguage = 0x544c41,
50  sEncoderSettings = 0x545353,
52  sSynchronizedLyrics = 0x534C54,
53  sGrouping = 0x545032,
54  sRecordLabel = 0x545042,
55  sUniqueFileId = 0x554649,
56  sComposer = 0x54434d,
57  sRating = 0x504f50
58 };
59 
60 uint32 convertToShortId(uint32 id);
61 uint32 convertToLongId(uint32 id);
62 
66 inline bool isLongId(uint32 id)
67 {
68  return (id & 0x00ffffff) != id;
69 }
70 
74 inline bool isShortId(uint32 id)
75 {
76  return (id & 0x00ffffff) == id;
77 }
78 
82 inline bool isTextFrame(uint32 id)
83 {
84  if(isShortId(id)) {
85  return (id & 0x00FF0000u) == 0x00540000u;
86  } else {
87  return (id & 0xFF000000u) == 0x54000000u;
88  }
89 }
90 
91 }
92 
93 }
94 #endif // ID3V2FRAMEIDS_H
bool isLongId(uint32 id)
Returns an indication whether the specified id is a long frame id.
Definition: id3v2frameids.h:66
bool isShortId(uint32 id)
Returns an indication whether the specified id is a short frame id.
Definition: id3v2frameids.h:74
uint32 convertToShortId(uint32 id)
Converts the specified long frame ID to the equivalent short frame ID.
bool isTextFrame(uint32 id)
Returns an indication whether the specified id is a text frame id.
Definition: id3v2frameids.h:82
uint32 convertToLongId(uint32 id)
Converts the specified short frame ID to the equivalent long frame ID.
Contains all classes and functions of the TagInfo library.
Definition: exceptions.h:9