Tag Parser  8.0.0
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 TAG_PARSER_ID3V2FRAMEIDS_H
2 #define TAG_PARSER_ID3V2FRAMEIDS_H
3 
4 #include <c++utilities/conversion/types.h>
5 
6 #include <string>
7 
8 namespace TagParser {
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  lUserDefinedText = 0x54585858,
36 
37  sAlbum = 0x54414c,
38  sArtist = 0x545031,
39  sComment = 0x434f4d,
40  sYear = 0x545945,
41  sRecordDate = 0x545243,
42  sTitle = 0x545432,
43  sGenre = 0x54434f,
44  sTrackPosition = 0x54524b,
45  sDiskPosition = 0x545041,
46  sEncoder = 0x54454e,
47  sBpm = 0x544250,
48  sCover = 0x504943,
49  sWriter = 0x545854,
50  sLength = 0x544c45,
51  sLanguage = 0x544c41,
52  sEncoderSettings = 0x545353,
54  sSynchronizedLyrics = 0x534C54,
55  sGrouping = 0x545032,
56  sRecordLabel = 0x545042,
57  sUniqueFileId = 0x554649,
58  sComposer = 0x54434d,
59  sRating = 0x504f50,
60  sUserDefinedText = 0x545858,
61 };
62 
63 uint32 convertToShortId(uint32 id);
64 uint32 convertToLongId(uint32 id);
65 
69 constexpr bool isLongId(uint32 id)
70 {
71  return (id & 0x00ffffff) != id;
72 }
73 
77 constexpr bool isShortId(uint32 id)
78 {
79  return (id & 0x00ffffff) == id;
80 }
81 
85 constexpr bool isTextFrame(uint32 id)
86 {
87  if (isShortId(id)) {
88  return ((id & 0x00FF0000u) == 0x00540000u) && (id != Id3v2FrameIds::sUserDefinedText);
89  } else {
90  return (id & 0xFF000000u) == 0x54000000u && (id != Id3v2FrameIds::lUserDefinedText);
91  }
92 }
93 
94 } // namespace Id3v2FrameIds
95 
96 } // namespace TagParser
97 #endif // TAG_PARSER_ID3V2FRAMEIDS_H
constexpr bool isLongId(uint32 id)
Returns an indication whether the specified id is a long frame id.
Definition: id3v2frameids.h:69
uint32 convertToLongId(uint32 id)
Converts the specified short frame ID to the equivalent long frame ID.
constexpr bool isShortId(uint32 id)
Returns an indication whether the specified id is a short frame id.
Definition: id3v2frameids.h:77
uint32 convertToShortId(uint32 id)
Converts the specified long frame ID to the equivalent short frame ID.
constexpr bool isTextFrame(uint32 id)
Returns an indication whether the specified id is a text frame id.
Definition: id3v2frameids.h:85
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:9