Tag Parser 12.3.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
id3v2frameids.cpp
Go to the documentation of this file.
1#include "./id3v2frameids.h"
2
3#include "../exceptions.h"
4
5namespace TagParser {
6
21namespace Id3v2FrameIds {
22
27std::uint32_t convertToShortId(std::uint32_t id)
28{
29 switch (id) {
30 case lAlbum:
31 return sAlbum;
32 case lArtist:
33 return sArtist;
34 case lComment:
35 return sComment;
36 case lYear:
37 return sYear;
38 case lOriginalYear:
39 return sOriginalYear;
40 case lRecordingDates:
41 return sRecordingDates;
42 case lDate:
43 return sDate;
44 case lTime:
45 return sTime;
46 case lTitle:
47 return sTitle;
48 case lGenre:
49 return sGenre;
50 case lTrackPosition:
51 return sTrackPosition;
52 case lDiskPosition:
53 return sDiskPosition;
54 case lEncoder:
55 return sEncoder;
56 case lBpm:
57 return sBpm;
58 case lCover:
59 return sCover;
60 case lWriter:
61 return sWriter;
62 case lLength:
63 return sLength;
64 case lLanguage:
65 return sLanguage;
67 return sEncoderSettings;
70 case lAlbumArtist:
71 return sAlbumArtist;
74 case lRecordLabel:
75 return sRecordLabel;
77 return sUserDefinedText;
78 case lRemixedBy:
79 return sRemixedBy;
80 case lCopyright:
81 return sCopyright;
82 case lPlayCounter:
83 return sPlayCounter;
84 case lRating:
85 return sRating;
86 case lISRC:
87 return sISRC;
89 return sPublisherWebpage;
90 case lUserDefinedURL:
91 return sUserDefinedURL;
92 default:
93 return 0;
94 }
95}
96
101std::uint32_t convertToLongId(std::uint32_t id)
102{
103 switch (id) {
104 case sAlbum:
105 return lAlbum;
106 case sArtist:
107 return lArtist;
108 case sComment:
109 return lComment;
110 case sYear:
111 return lYear;
112 case sOriginalYear:
113 return lOriginalYear;
114 case sRecordingDates:
115 return lRecordingDates;
116 case sDate:
117 return lDate;
118 case sTime:
119 return lTime;
120 case sTitle:
121 return lTitle;
122 case sGenre:
123 return lGenre;
124 case sTrackPosition:
125 return lTrackPosition;
126 case sDiskPosition:
127 return lDiskPosition;
128 case sEncoder:
129 return lEncoder;
130 case sBpm:
131 return lBpm;
132 case sCover:
133 return lCover;
134 case sWriter:
135 return lWriter;
136 case sLength:
137 return lLength;
138 case sLanguage:
139 return lLanguage;
140 case sEncoderSettings:
141 return lEncoderSettings;
144 case sAlbumArtist:
145 return lAlbumArtist;
148 case sRecordLabel:
149 return lRecordLabel;
150 case sUserDefinedText:
151 return lUserDefinedText;
152 case sRemixedBy:
153 return lRemixedBy;
154 case sCopyright:
155 return lCopyright;
156 case sPlayCounter:
157 return lPlayCounter;
158 case sRating:
159 return lRating;
160 case sISRC:
161 return lISRC;
163 return lPublisherWebpage;
164 case sUserDefinedURL:
165 return lUserDefinedURL;
166 default:
167 return 0;
168 }
169}
170
178bool isPreId3v24Id(uint32_t id)
179{
180 switch (id) {
181 case lYear:
182 case lOriginalYear:
183 case lRecordingDates:
184 case lDate:
185 case lTime:
186 return true;
187 default:
188 return false;
189 }
190}
191
196bool isOnlyId3v24Id(uint32_t id)
197{
198 switch (id) {
199 case lRecordingTime:
200 case lReleaseTime:
202 case lTaggingTime:
203 return true;
204 default:
205 return false;
206 }
207}
208
209} // namespace Id3v2FrameIds
210
211} // namespace TagParser
TAG_PARSER_EXPORT bool isPreId3v24Id(std::uint32_t id)
TAG_PARSER_EXPORT std::uint32_t convertToShortId(std::uint32_t id)
Converts the specified long frame ID to the equivalent short frame ID.
TAG_PARSER_EXPORT bool isOnlyId3v24Id(std::uint32_t id)
TAG_PARSER_EXPORT std::uint32_t convertToLongId(std::uint32_t id)
Converts the specified short frame ID to the equivalent long frame ID.
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10