Tag Parser 12.4.0
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;
41 return sOriginalMediaType;
42 case lRecordingDates:
43 return sRecordingDates;
44 case lDate:
45 return sDate;
46 case lTime:
47 return sTime;
48 case lTitle:
49 return sTitle;
50 case lGenre:
51 return sGenre;
52 case lTrackPosition:
53 return sTrackPosition;
54 case lDiskPosition:
55 return sDiskPosition;
56 case lEncoder:
57 return sEncoder;
58 case lBpm:
59 return sBpm;
60 case lCover:
61 return sCover;
62 case lWriter:
63 return sWriter;
64 case lLength:
65 return sLength;
66 case lLanguage:
67 return sLanguage;
69 return sEncoderSettings;
72 case lAlbumArtist:
73 return sAlbumArtist;
76 case lRecordLabel:
77 return sRecordLabel;
79 return sUserDefinedText;
80 case lRemixedBy:
81 return sRemixedBy;
82 case lCopyright:
83 return sCopyright;
84 case lPlayCounter:
85 return sPlayCounter;
86 case lRating:
87 return sRating;
88 case lISRC:
89 return sISRC;
90 case lKey:
91 return sKey;
93 return sPublisherWebpage;
99 return sAudioFileWebpage;
101 return sAudioSourceWebpage;
103 return sPerformerWebpage;
104 case lUserDefinedURL:
105 return sUserDefinedURL;
106 default:
107 return 0;
108 }
109}
110
115std::uint32_t convertToLongId(std::uint32_t id)
116{
117 switch (id) {
118 case sAlbum:
119 return lAlbum;
120 case sArtist:
121 return lArtist;
122 case sComment:
123 return lComment;
124 case sYear:
125 return lYear;
126 case sOriginalYear:
127 return lOriginalYear;
129 return lOriginalMediaType;
130 case sRecordingDates:
131 return lRecordingDates;
132 case sDate:
133 return lDate;
134 case sTime:
135 return lTime;
136 case sTitle:
137 return lTitle;
138 case sGenre:
139 return lGenre;
140 case sTrackPosition:
141 return lTrackPosition;
142 case sDiskPosition:
143 return lDiskPosition;
144 case sEncoder:
145 return lEncoder;
146 case sBpm:
147 return lBpm;
148 case sCover:
149 return lCover;
150 case sWriter:
151 return lWriter;
152 case sLength:
153 return lLength;
154 case sLanguage:
155 return lLanguage;
156 case sEncoderSettings:
157 return lEncoderSettings;
160 case sAlbumArtist:
161 return lAlbumArtist;
164 case sRecordLabel:
165 return lRecordLabel;
166 case sUserDefinedText:
167 return lUserDefinedText;
168 case sRemixedBy:
169 return lRemixedBy;
170 case sCopyright:
171 return lCopyright;
172 case sPlayCounter:
173 return lPlayCounter;
174 case sRating:
175 return lRating;
176 case sISRC:
177 return lISRC;
178 case sKey:
179 return lKey;
181 return lPublisherWebpage;
187 return lAudioFileWebpage;
189 return lAudioSourceWebpage;
191 return lPerformerWebpage;
192 case sUserDefinedURL:
193 return lUserDefinedURL;
194 default:
195 return 0;
196 }
197}
198
206bool isPreId3v24Id(uint32_t id)
207{
208 switch (id) {
209 case lYear:
210 case lOriginalYear:
211 case lRecordingDates:
212 case lDate:
213 case lTime:
214 return true;
215 default:
216 return false;
217 }
218}
219
224bool isOnlyId3v24Id(uint32_t id)
225{
226 switch (id) {
227 case lRecordingTime:
228 case lReleaseTime:
230 case lTaggingTime:
231 return true;
232 default:
233 return false;
234 }
235}
236
237} // namespace Id3v2FrameIds
238
239} // 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